Jump to content
Sign in to follow this  
jokke

ControlSend sending Alt, Shift.....

Recommended Posts

jokke

Heya, ime stuggling abit to make my ControlSend send Both Shift and F1 at once.

These things iwe tried:

ControlSend("win","","","+{F1}")
;------------------------------------------

ControlSend("win","","","{SHIFTDOWN}{F1}")
ControlSend("win","","","{SHIFTUP}")
;------------------------------------------

ControlSend("win","","","{SHIFTDOWN}")
ControlSend("win","","","{F1}")
ControlSend("win","","","{SHIFTUP}")
;------------------------------------------

oh, i tried with both send flags (0/1).

As a sidenote, if i activate the window then use:

WinActivate("win","")
Sleep(100)
Send("+{F1}")

That works, but having to activate the window means the process will interfere with other thing's as im trying to automate this task.

Any ideas?

Edited by jokke

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites
water

The first example should work. But what you are missing is the ControlId.

ControlSend("win","",ControlId,"+{F1}")

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
jokke

Theres no control, thats why its blank :)

Well i am sending single keys just fine, but once i start mixing up more keystrokes at once it just wont send em.

ControlSend("win","","","+{F1}") Results sending F1 but not the Shift.

As i worte as a side note, when i activate the window and use Send it works.

Edited by jokke

UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt.

Share this post


Link to post
Share on other sites
water

See Remarks of ControlSend: " ...works in a similar way to Send but it can send key strokes directly to a window/control, rather than just to the active window."

To send key strokes to an active window use Send. To send key strokes to an inactive window use ControlSend and specify a ControlId.

So I think what you want (send key strokes to an inactive window) can't be done.

For further info please see this post.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×