Sign in to follow this  
Followers 0
jokke

ControlSend sending Alt, Shift.....

4 posts in this topic

#1 ·  Posted (edited)

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



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 (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

#4 ·  Posted (edited)

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 (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

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  
Followers 0