AutoHotkey Community

It is currently May 27th, 2012, 3:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: May 13th, 2011, 1:55 am 
Offline

Joined: July 20th, 2007, 5:49 am
Posts: 27
I cannot get keystrokes to send to a certain app on a friends computer. I've tried SendEvent, SendInput, SendPlay. I've tried a number of different keystroke combos.

This works on my machine with this app, but not on a friends with the same app (same version). Other apps that I control, like notepad, work fine on both computers.

Any ideas on things to try?

Code:
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
ShortSleep = 500
LongSleep = 1000
SetTitleMatchMode 2

IfWinExist TradeStation
{
    WinActivate

    IfWinActive, TradeStation
    {             
        ; I've verfied it gets here with a msgbox
        sleep LongSleep
        SendInput !v
        sleep LongSleep
        SendInput r
        sleep LongSleep
        SendInput e
    }                   
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2011, 2:01 am 
Offline
User avatar

Joined: November 19th, 2010, 3:12 pm
Posts: 787
Location: At my computer
Might I suggest % on you sleep variables? And go from there.

Code:
sleep, %longsleep%


Edit:
And the two machines are running the same version of Windows and AHk?

_________________
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion

My personal site


Last edited by dmg on May 13th, 2011, 2:08 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2011, 2:07 am 
Offline

Joined: December 26th, 2010, 7:40 pm
Posts: 4172
Location: Awesometown, USA
dmg wrote:
Might I suggest % on you sleep variables? And go from there.

Code:
sleep, %longsleep%


Sleep wrote:
Delay: The amount of time to pause (in milliseconds) between 0 and 2147483647 (24 days), which can be an expression.

source: http://www.autohotkey.com/docs/commands/Sleep.htm

_________________
Autofire, AutoClick, Toggle, SpamWindow Control Tools
Recommended: AutoHotkey_L


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2011, 2:10 am 
Offline

Joined: April 16th, 2011, 7:18 am
Posts: 176
Location: Jogjakarta, Indonesia
@ Harryman
Your script run fine on my computer too (i'm on XP)

Did you and your friend use a different OS? Vista/Win7 maybe? UAC on vista/win7 was known to have some issue on SendInput command, try to turn UAC Off.


Last edited by j[]hn on May 13th, 2011, 2:59 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2011, 2:25 am 
Offline
User avatar

Joined: November 19th, 2010, 3:12 pm
Posts: 787
Location: At my computer
nimda wrote:
dmg wrote:
Might I suggest % on you sleep variables? And go from there.

Code:
sleep, %longsleep%


Sleep wrote:
Delay: The amount of time to pause (in milliseconds) between 0 and 2147483647 (24 days), which can be an expression.

source: http://www.autohotkey.com/docs/commands/Sleep.htm

    1. I did read that before posting but as I do not really know what an expression is it did not mean much to me. (yes I have read the docs)
    2. Since % works just fine with sleep I thought it might be worth looking at.
    3. It was only a suggestion. :)

_________________
"My dear Mr Gyrth, I am never more serious than when I am joking."
~Albert Campion

My personal site


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2011, 3:01 am 
Offline

Joined: July 20th, 2007, 5:49 am
Posts: 27
j[]hn wrote:
@ Harryman
Your script run fine on my computer too (i'm on XP)

Did you and your friend use a different OS? Vista/Win7 maybe? UAC on vista/win7 was known to have some issue on SendInput command, try to turn UAC Off.


We are both on Windows 7. I have UAC already turned off. I will tell him to turn off UAC and try that. Thanks for the suggestion.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Leef_me and 38 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group