Sending keys to fullscreen programs

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Trk114
Newbie
Posts: 5
Joined: Wed Aug 24, 2005 7:35 pm

Sending keys to fullscreen programs

Post by Trk114 » Wed Aug 24, 2005 8:23 pm

Hi.
This is my script:


\\ masterscript
Wait>0.2
Run Program>C:\Program Files\Macro Scheduler\msched C:\Program Files\Macro Scheduler\ w.scp
Wait>0.2
Run Program>C:\Program Files\Macro Scheduler\msched C:\Program Files\Macro Scheduler\ a.scp
Wait>0.2
Run Program>C:\Program Files\Macro Scheduler\msched C:\Program Files\Macro Scheduler\ s.scp
Wait>0.2
Run Program>C:\Program Files\Macro Scheduler\msched C:\Program Files\Macro Scheduler\ d.scp
Wait>0.2

\\ w
Let>SK_DELAY=10
label>st
waitkeydown>w
Send Character/Text>ww
goto>st

\\ a
Let>SK_DELAY=10
label>st
waitkeydown>a
Send Character/Text>aa
goto>st

\\ s
Let>SK_DELAY=10
label>st
waitkeydown>s
Send Character/Text>ss
goto>st

\\ d
Let>SK_DELAY=10
label>st
waitkeydown>d
Send Character/Text>dd
goto>st

(This is not the full script but it doesnt work just as well)



My problem is that this script works for some full screen programs but not for others.
For example it works in "Call of duty", but not in "Gunz: the duel".
My question is: how can you bypass this lock and make it work for these programs?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Aug 25, 2005 5:28 pm

Sorry, no experience of those apps - I assume they are games? If they are games they are probably running in DOS mode or single tasking mode and therefore Macro Scheduler may not be able to work with them at all. If you want the game to run AND Macro Scheduler, or any other application for that matter, to run fully multitasking, at the same time, then they will have to be run in windowed mode.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Thu Aug 25, 2005 7:22 pm

I don't know the programs either, but do you need RP_WAIT=1 to let each of these finish before the next one runs?

And do you need to use SetFocus> before you use Send Character> ?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Trk114
Newbie
Posts: 5
Joined: Wed Aug 24, 2005 7:35 pm

Post by Trk114 » Fri Aug 26, 2005 12:22 am

Sorry, i didn't know i was dealing with computer game illiterates here... (thats a compliment)

Yes these are games, the first of which is very popular. 1st was out end 2003, 2nd out start of 2005. But their release dates do not apply for my problem as there are older games that wont accept input and newer ones that will. I am only mentioning them as i did not have any problems with any of my full screen apps, (such as WMP full screen mode for example)
mainly because i dont have more then a few for which i need to use MS with for any reason, so any full screen app that won't accept input would apply.

At any rate, that script works with first game, but not the second. A strange thing is that with the first, ALT-TAB is disabled, but not with the second, however this probably doesnt mean much because ALT-TAB can easily be enabled in the first with a 10 line long hack (which i won't post). I want to know why does this happen (the script not working, that is).

One possible and the most probable solution is that the second game "disables" all the global hotkeys from being sent to a program other than itself and windows. Another is that this is a bug related to video drivers and MS. If one of these is the case, i want to know how to be able to bypass/fix it in any way. BTW i've heard that this script works for some other macro program(s), specifically ACTools. That program also has a "global keys" feature that eliminates the need to have multiple MS windows running which would be nice to have in MS... An example of the same script made in ACTools:

SetActiveWindow Program_name
while 5 = 5
clearglobalkeys
if {globalkeys} contains 084
clearglobalkeys
keys w
delay 10
keys w
end
clearglobalkeys
if {globalkeys} contains 071
clearglobalkeys
keys s
delay 10
keys s
end
clearglobalkeys
if {globalkeys} contains 070
clearglobalkeys
keys a
delay 10
keys a
end
clearglobalkeys
if {globalkeys} contains 072
clearglobalkeys
keys d
delay 10
keys d
end
end

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Aug 26, 2005 2:28 am

One important thing to keep in mind is that Macro Scheduler automates the manual process. If you cannot use certain keys manually, then you probably will not be able to do it with Macro Scheduler either. (There may be some creative work-arounds).

Have you tried "recording" the keystrokes while playing the game(s)?

There is no globalkey type of function in Macro Scheduler itself. But perhaps someone can suggest a way to do that with VBScript or LibFunc tools.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts