jokke Posted November 25, 2009 Share Posted November 25, 2009 (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 November 25, 2009 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. Link to comment Share on other sites More sharing options...
water Posted November 25, 2009 Share Posted November 25, 2009 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
jokke Posted November 25, 2009 Author Share Posted November 25, 2009 (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 November 25, 2009 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. Link to comment Share on other sites More sharing options...
water Posted November 25, 2009 Share Posted November 25, 2009 (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 November 25, 2009 by water My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
jifb Posted January 5 Share Posted January 5 Can someone explain why ControlSend("win","","","+{F1}") doesn't work whereas ControlSend("win","","","{F1}") Send("+{F1}") Send("{F1}") works well? The discussion here resulted in the statement that you need a ControlID, but didn't answer all questions. So in other words: Why does a missing ControlID block using modifiers like "+" etc? What's the actual reason? May it be application dependend? Of course there's always a workaround but it's nicer to have a straightforward way. Link to comment Share on other sites More sharing options...
Nine Posted January 5 Share Posted January 5 (edited) 14 years ago, I don't remember how AutoIt was performing with ControlSend, but today it works well with/without ControlId. Do some tests you will see by yourself... Edited January 5 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now