Te enseño lo básico de SendInput

Tutoriales de referencia a la programación en Pauscal

Te enseño lo básico de SendInput

Notapor PowerDeath » Sab Jul 12, 2014 7:12 pm

Bueno, como dice en el post les voy a enseñar a usar esta API que nos provee Windows.
Como es obvio, comenzamos abriendo la información de esta api en MSDN
El enlace es: SendInput

Como pueden ver, su sintaxis es la siguiente.

Imagen

Traducido a Pauscal queda asi.

Imagen

Como ven, todos los tipos de datos son Entero y este alcanza de 0 hasta 4.294.967.295.
Sin decimales.

Ahora si volvemos al MSDN podremos ver que en la descripción de parametros nos pide en primer lugar el numero de estructuras que pasaremos, Generalmente 1.

En segundo lugar un puntero a una estructura INPUT.

Y en tercer lugar el tamaño de la estructura en bytes.


Imagen

Entonces, pasamos directamente a la estructura que encontraremos haciéndole clic al enlace INPUT.

El enlace es el siguiente: INPUT

Y encontramos la siguiente sintaxis.

Imagen

En pauscal lo traducimos de esta menera.

Imagen

A diferencia de C++, En pauscal no se puede declarar una Unión directamente en la estructura por lo que la declaramos arriba.

Volvemos a la MSDN y vemos que sus miembros son:

Imagen

En el parámetro "Type" establecemos el valor que señala que estructura vamos a utilizar.
0 Para INPUT_MOUSE
1 Para INPUT_KEYBOARD
2 Para INPUT_HARDWARE

y debajo de esto nos dice que:

"Mi" es una variable que llama a una estructura MOUSEINPUT
"Ki" es una variable que llama a una estructura KEYBOARDINPUT
"Hi" es una variable que llama a una estructura HARDWAREINPUT

y obviamente tenemos que agregar estas 3 estructuras a nuestro codigo fuente.

Sus sintaxis son:


Imagen
Imagen
Imagen

Lamentablemente no nos meteremos muy a fondo con los parametros de estas estructuras.

Traducido a Pauscal:

Imagen

Nuestro código quedaría así:

Imagen

Ya tengo todo el código escrito, pero no se como utilizarlo. ¿Como hago?

Bueno, supongamos que queremos utilizar SendInput para simular un Clic derecho del ratón.

Lo mejor es comenzando encerrando todo en un procedimiento para re-utilizar el código, Pero yo lo dejare libre ya que es algo ocasional.

Comenzamos creando una variable llamada "Send" de tipo INPUT Estructura. aunque se puede llamar de cualquier manera.

Recordemos algo, INPUT es la estructura a la cual le establecemos el tipo de Estructura que utilizaremos y que contiene un puntero hacia una Unión que contiene el resto de las Estructuras a las cuales le debemos establecer los datos.


Imagen

Ahora establecemos en la estructura INPUT el tipo de estructura que utilizaremos dentro de la unión, en este caso MOUSEINPUT.

Imagen

Ahora establecemos los valores a la estructura de esta manera.

Imagen

A través de la variable "Send" entramos a la unión "Union" y seleccionamos una de las 3 estructuras, "Mi" ya que es la variable que llama a MOUSE_INPUT Estructura.
Una ves dentro de "Mi" Seleccionamos llenamos "dwFlags" con el valor "&0008"

El valor "&0008" señala que "Se ha pulsado el botón derecho." pero recuerden, que no lo suelta. lo mantiene presionado.
Una vez rellenado los parámetros les quedara algo así.


Imagen

Y ya es hora de llamar a la función SendInput!
La utilizamos de la siguiente manera.


Imagen

Recuerden que explique esta función al inicio del post, pero igual lo are de nuevo.

Parámetro 1 _ El numero de estructuras en pInputs Array.Generalmente 1.
En segundo lugar un puntero a una estructura INPUT.
Y en tercer lugar el tamaño de la estructura en bytes.

Para obtener el puntero de una estructura escribimos un Arroba "@" delante de la variable que la invoca.

Para obtener el tamaño utilizamos la función Long en la variable que la invoca.

Y listo, si lo ejecutan podrán ver que se cliqueo el botón derecho del ratón Virtualmente obvio.

Código Final:


Imagen

¡Saludos!
Imagen
PowerDeath
 
Mensajes: 160
Registrado: Sab Ago 11, 2012 5:29 am

Sponsor


Re: Te enseño lo básico de SendInput

Notapor jmetin2 » Vie Oct 24, 2014 8:54 pm

Orales borther..... me da guasto que ya eres un programador experto en el lenguaje
:)
jmetin2
 
Mensajes: 168
Registrado: Jue Dic 15, 2011 12:07 pm
Ubicación: Merida, Yucatan, Mexico

cheap chian jerseys 0-22-0-22-241174 cheap ncaa jerseys

Notapor SUo71pnwhl » Lun Abr 30, 2018 11:48 pm

You set aside time every week to work on school homework, right? What about your Scout homework? Set aside one hour per week to work on advancement. Well, pride in anything is kind of stupid. They share. Of course, the above scenario is extreme and rare.

I interface with my database and my database is in cyberspace, so I interactive, I hyperactive, and from time to time I radioactive. In the bigger scheme of education, if you took 100 children in South Africa at the beginning of Grade 1, only 4 of those 100 would eventually complete a degree..

wholesale nfb jerseys The theory behind how muscle can be gained in a deficit is that if you have ample stores of body fat, the fat can be released in a deficit and used for the energy requirements needed to build muscle (muscle protein synthesis, aka building muscle, is an energetically costly process). wholesale nfb jerseys

wholesale nfl jerseys I'm all in on the Kevin Durant bandwagon. George? Small bit of good news. People keep fantasising about the future in 30 50 years time in lateral terms. Take it or leave it.. There are leagues, especially in the younger age groups, that have rules that provide a maximum length of time that a game can go. wholesale nfl jerseys

cheap nhl jerseys Deciding to live your life as a physically active person can help change the way you see yourself. Hundreds and hundreds of posts and comments, and that what gets by our automod robot (and that bot is good!). Whilst we all know of people (or suffer ourselves) with phobias of spiders, hights and small places, there are hundreds, if not thousands of bizarre things that will bring someone out in a cold sweat, send shivers down their spine and maybe even induce a panic attack! Here is my list of the top 10 strangest and most unusual phobias that people have reported to suffer from. cheap nhl jerseys

I hate when people oversell things so I'll let you decide for yourself but I will say you will at least get your moneys worth for the MetroNorth ticket and easy train ride.. Luke is very happy that she has returned. My procedure is usually this: use Stoner Invisible Glass to spray down windshield, use plastic razor blade, clean windshield, clay, once over with cleaner again, dry with microfiber, apply rain x, dry.

I had hoped that there were changes, but apparently not. It not about being able to shoot someone who trying to steal my TV. However the brick n mortar games stores don want to see an all digital future, for many of them it kill them off. Since I was fairly young I was the first of all my friends to get their period, because of this I had no one to compare it to; I thought that what I was experiencing was normal.

cheap authentic jerseys IntroductionThe healthy parent frequently makes sacrifices and sets aside their own desires (and even needs) in deference to those of their child. Dice onions and pickles by hand. Another way to use the cornstarch without the risk of dust inhalation by your baby is to create a paste out of it. cheap authentic jerseys

I do wish that someone on your show had known the information in the link below. With cash to spare, we spent the rest of the morning at the Two Oceans Aquarium, gawking at the strange creatures that live under the waves. When reading a piece from publications like them, I just suggest reading the same story from other publications, to compare and contrast..

cheap jerseys wholesale And failing, time and again, does nothing for your confidence in yourself.. The team still takes a caphit, and the caphit by year is calculated as follows:Multiply the remaining salary (excluding signing bonuses) by the buyout amount (as determined by age) to obtain the total buyout costSpread the total buyout cost evenly over twice the remaining contract yearsDetermine the savings by subtracting the annual buyout cost from Step 2. cheap jerseys wholesale

cheap nba jerseys If you don't love it, sell it now at its highest value and buy something you love enough to drive until it's dead. Why? No one really seems to know. There are many causes of clavicular fracture. I think it's probably best to avoid it until it's more polished and there is more documentation.. cheap nba jerseys

cheap jerseys wholesale I know you have no been getting my letters because I know you would write back if you did. My phone was dead and my buddies had only a few %. A second feature sported by the 727 was an "air stair" system mounted in the tail of the aircraft under the center engine cheap jerseys wholesale.
SUo71pnwhl
 
Mensajes: 549
Registrado: Jue Abr 26, 2018 11:35 pm

cheap mlb jerseys 0-22-0-22-241236 cheap jerseys china

Notapor G7PAk6U0BH » Mar May 01, 2018 1:57 am

Bare root roses that you purchase from a nursery are in the dormant state. Let me first address this: Mayfield is the best looking of the bunch by far has the all American style with a little party boy swagger can't say I like men but if I did he would be a catch.

cheapjerseys This is similar to how I felt about Channing Tatum. While this may not be a business opportunity for young children, it's a great way for a teenager to earn quick cash.. A typical human's DNA is contained in 23 pairs of chromosomes. The train from Takayama to Nagoya is also a spectacular ride, and would be a shame if you went through it in the dark. wholesale china jerseys

The hack attack was first revealed a month ago. The day that the quake strikes may seem insignificant, especially if you are some distance from the epicenter. It might be that the appropriate schedule for you would be to run one mile at a relatively slow pace two or three days a week and gradually working up from there, as if you were a new runner.

All the best,To me everything I ever seen of Tarantino as a person, interviews and whatnot, gave me the impression that he a kind of shitty if not an outright shitty person. But here you are, and you can see not logical reason, but you go into full panic mode.

cheap jerseys china To Daisy, he is some puzzlingly rich man who has somehow managed to make his way back into her life. Lantern tattoo designs can come in a variety of different variations, colors, and styles. I was answer a question given to me and try to provide my understanding of the perspective. cheap jerseys china

A lot of times I might see something go wrong but not be able to definitively determine what caused it without digging deeper, so I think the preparation aspect adds a lot to the replay analysis. This state of disenfranchisement by a visibly corrupt plutocracy cannot last forever.

This means a separate loose back and seat. She just never got the big screen breaks that she should have. In 204 and 55 around half of our people Sel Res. I would do it again. Fender electric guitars, quite naturally, always compete against Gibson guitars.

cheap china jerseys Basically while there are flaws Eastern faiths do better with coexistence generally which is why you see more Buddhist overlap. Thanks for your time so much for the reliable and sensible guide. Given this Holocaust attempt, it is surprising that black cats were not removed from the feline gene pool altogether, unless perhaps, it is true that cats do in fact possess 9 lives. cheap china jerseys

Maybe it breaks down in a month. "Go over every inch of this place and find something," she told the two officers who had followed them up.. Huge music fest will in Australia for. I found him to be very straightforward and trustworthy," Bush said, standing next to Putin.

cheap nfl jerseys This type of post is right up my alley actually. As much as I want people to learn and grow, I want them to grow towards the right rays of enlightenment.. Extra ball handlers, extra shooters, extra size, more athleticism or length defensively whatever he needs is available. cheap nfl jerseys

cheap nba jerseys Pay should be 90% for 6 weeks and then a minimum of 113 per week for the remaining 20 weeks. Even on the coldest New York days, my nipples don't peek through.. Told The New Yorker magazine Jeffrey Toobin in August that he had no recollection of e mails he is accused of exchanging with top university officials over two specific allegations of abuse involving Sandusky: one in 1998 and another in 2001.. cheap nba jerseys

They will not show any other Conference USA games. The Vegas shooter utilized a loophole in the law to convert his weapon(s) to what seemed like an automatic weapon. Hids recent cancellation of unemployment benefits shows he DOES NOT CARE AT ALL TO HELP THE UNEMPLOYED..

cheap ncaa jerseys I hold onto my reels from my mother and uncle, and tapes and DAT that I have collected and recorded myself like my life depends on it. Vi snakker nok om minimum 14 r fr sagen overhovedet popper op igen, hvor han har krav p at komme foran en domstol efter afvisning p prvelsladelse.. cheap nfl jerseys

cheap nba jerseys "There was a problem in the oil sector; there was a problem of economic recession, with our steel industry, with our automotive sector."We lost a large collection from the ICMS [tax on circulation of goods and services]; we lost a lot of royalties from oil; and this public emergency measure has aimed to draw attention of every citizen to the financial difficulties experienced by the state cheap football jerseys.
G7PAk6U0BH
 
Mensajes: 564
Registrado: Jue Abr 26, 2018 11:35 pm

cheapjerseys 0-22-0-22-241236 cheap nfl jerseys

Notapor G7PAk6U0BH » Mar May 01, 2018 1:58 am

We've seen audiences for Match of the Day grow in recent years in conjunction with our extensive football coverage on 5 live, the market leading BBC Sport website and via our regular sports news bulletins.. Jesus sends Him to be our counselor, someone who will tell us the right thing to do and help us not be afraid.

Clarity of things like healthbars, ability windups, status effects etc are a massive improvement over Dow2 or CoH2. Try to scribble on for at least 5 10 minutes.. My doctor gave the option of staying overnight in the hospital or going home, I chose to go home..

This is place is meant for discussing how to become a better boxer. They might or might not be affiliated with the hispanic neo nazis that also got banned after 2 games.. Two completely different types of government and sadly, our American government is outdated and does not operate fast enough for the world of today.

wholesale jerseys That isn't even to start on the absolutely ridiculous way that they COMPLETELY IGNORE the painfully obvious Trump/Russia/Money Laundering/Obstruction/Campaign Finance Fraud/Secretly Sending the CIA director to NK/John Bolton/Hannity Coordination/Manafort in Ukraine/Erik Prince's shadow army/Kushner the Arabian peninsula and a million other things from the political party that has firm control over all 3 branches of government. cheap nhl jerseys

cheap jerseys china Works out well as I go on holiday 4 weeks after the competition, so killing two birds with one stone.. With a Trad IRA, you can put all $1,000 into the Trad IRA or 401k and the number on your W 2 (and number used to compute withholding at paycheck time with 401k, otherwise you just get a larger refund in the case of the IRA) goes down $1,000, so you can afford to put all $1,000 in. cheap authentic jerseys

Add a tablespoon of essential flower oil in 200 ml of distilled water, your flower water will be ready. Absolutely spoiled. The idea that a range increase on a single ability means a Champion is getting an entire rework is completely absurd. Two causeway bridges provide access to this scenic area.

Builders and young adults and families flocked to Coral Springs and it is now mainly a large, upscale community of young families. Ie the death of what we exist in). You double peek things! In competitive, you very, very rarely double peek shots. I would google it.

cheap jerseys supply Auerdem immer mehr Versuche, Leute zu Registrierung und pausenlosem Login zu drngen bzw. As equals. Do you realize how idiotic that sounds. Perseus Saves Danae The journey to the caves where Medusa lived was fraught with peril, yet Perseus made it through. cheap jerseys supply

cheap football jerseys It's it's a really good way determine if this is possible for lead this. The pictures below will demonstrate how to defend your self during attacks:. The Need For Encouragement by a CoachIdeally, every athlete could be bolstered by the guidance of two separate coaches: one to spur his physical strength, while the other helps confront the psychological anxiety inherent in competitions of any kind. cheap football jerseys

cheap jerseys china Cilantro lime rice is a favorite dish of many and is often served in America's Mexican restaurants.. This season he was in a rough situation in the AHL. +1 on signing up for races. What is Project Based Learning?Simply put, PBL is learning in which the student produces something useful to himself and others. cheap jerseys china

This will force governments to use their scarce resources to provide new ones while trying to maintain the existing ones which will be deteriorating at a very fast rate. I had already started cutting him back and was at the vet with him and the vet said something.

cheapjerseys The oldest structure from Spanish Colonists is from 1521. Don't forget to come back here and share what you did, too!. Some cherry picking with him. The sooner MS realize this, the better. Luk 9:35 36 KJV And there came a voice out of the cloud, saying, This is my beloved Son: hear him. cheapjerseys

wholesale nfb jerseys The King With Six Friends by Jay Williams. We did not want disruptions for the ICC Champions Trophy (taking place in England in June), where we could have had a situation where a new coach took the team to a tournament first up. Why did they have to shoot him? Send in the dogs, send a taser wholesale nfb jerseys.
G7PAk6U0BH
 
Mensajes: 564
Registrado: Jue Abr 26, 2018 11:35 pm

cheap nba jerseys 0-23-0-23-241609 cheap chian jerseys

Notapor edEfyBQlAG » Mar May 01, 2018 4:09 am

The greatest comeback ever seen in a major final was about to happen. Forty eight percent of those questioned in a CBS News survey in early May said that the use of marijuana should be legal, with 47% disagreeing. Like OP, I have diagnosed adhd and can never really finish a book.

cheap football jerseys If it is totally dry the rose is in need watering.. He should put it behind him and completely avoid it. The carbs can be classified as either "simple" (sugars such as table sugar and honey) or "complex" (starches such as bread). I view vaccination as a public health issue. cheap nhl jerseys

cheap nfl jerseys The events are all being told well after the fact by a character who knew the main character and wants to set the record straight about what she did and didn actually do. And making a case that the Laws be suspended or bent for entertainment purposes is the most ridiculous idea I ever seen.Oliver was damned if he did or didn in that situation. cheap mlb jerseys

So even in the parts where humans didn rely on their dogs and birds to do the work for them, perhaps there was not as much pressure to perform.But then, of course, there the ultimate solution. Marshals in every room, Cuban diplomats huddled around the dining room table and a half dozen first graders from a small city east of Havana watching the "Lion King" in Spanish upstairs..

cheap china jerseys It will be much harder now though. He described in the most terrible detail the experience of living in a WW1 pit made by a shell impact, the high water table ensuring the rotting dead bodies, human excrement and mud all stayed mixed together at one feet, ankles, or whole body depending on how unlucky you were. cheap china jerseys

cheap authentic jerseys With her footage actually aired in the recent Hall of Fame induction of Ivory, I hope they keep this trajectory of slowly bringing Chyna back into attention that she sorely deserved, certainly earning a Hall of Fame induction herself after what she done for the Women Division before. cheap authentic jerseys

Now if I can hit a hook flay that could set up a kill, awesome. Lyle Mason, MD, orthopedic surgeon for the Utah Jazz, has a rule of thumb that he applies equally to his basketball players, weekend warriors and regular guys wondering if they should work out when sick.

The life span of these televisions is longer as compared to plasmas. Nope, I not ignorant and know it not a black and white situation, but I know my limits, and will probably always drive regardless if smoke. The medical payments doesn require liability on your friend part, just something happened at his house.

cheap chian jerseys Ja'Quan Newton has emerged to provide ample protection on nights when Angel Rodriguez just doesn't have it offensively, while Kamari Murphy has become a much needed compliment to Tonye Jekiri on the boards. I don think they fucked up by running Bitcoin up to $20k on purpose. wholesale jerseys

Find a practice partner. However, time has change as the old rule and political mode is no longer effective to follow deception on societal welfare as the modern technologies brighten the image of societal truth. The phenomenon is particularly visible in countries that dominate the sport.

wholesale jerseys Kids rhymes videosKids rhymes videos are extremely poplar among children. We continued to our destination and I pigged out on a half pound burger for lunch. Shinsuke hits Roman with a low blow but because Roman has balls of steel he is unaffected. Even though that is a natural response, that would still be considered murder. wholesale jerseys

cheap jerseys wholesale Oil pastels are new. Summing it UpBy the way, the Pandora Pink Showstopper is no longer mine, I sold it to a lovely girl in the British UK. Other times, he appears to be a voice of reason, calming down a manic Calvin.. At one point he even ties Jake up in the ropes and chases after Cheryl, who was at ringside. cheap jerseys wholesale

The African cuisine is a beautiful concoction of tropical fruits and vegetables as well as the exotic seafood varieties. Secondly, find a firm that specializes in server builds to do the work for you. Because everyone else save Jim Thome, and Ken Griffey Jr., who put up the kinds of numbers Albert did in St.
edEfyBQlAG
 
Mensajes: 558
Registrado: Jue Abr 26, 2018 11:34 pm


Volver a Manuales, Tutoriales y Videotutoriales

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 1 invitado

cron