Joan6149 Posted November 30, 2019 Share Posted November 30, 2019 Hello, i have desktop aplication on shift+s assigned hotkey and autoit script for send text from textfile to aplication textfields, my problem is: where my scrip sends S character with (shift+s) the app launch assigned subrutine at (shift+s) and isn't write S. How i can write S with autoit without shift+s?? Thanks, and sorry for my inglish Link to comment Share on other sites More sharing options...
Nine Posted November 30, 2019 Share Posted November 30, 2019 Try using a translator. If you have some code, post it. If you don't we will be hardly able to help you out... Joan6149 1 “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...
Exit Posted November 30, 2019 Share Posted November 30, 2019 Just set hotkey "ctnl+shift+s" to send the "S" See my sample here: _HotKey("{ESC}") ; press ESC to exit _HotKey("^+S") ; press Cntl+Shift+s to send "S" to application _HotKey("+s") ; press Shift+s to send hotkey shift+s to application Func _HotKey($hotkey = "") ; ! ALT + SHIFT ^ CONTROL # WinKey Switch @HotKeyPressed Case "{ESC}" Exit 0 * MsgBox(64 + 262144, Default, "Exit", 1) Case "^+S" HotKeySet("+s") Send("S") HotKeySet("+s", "_HotKey") Case "+s" MsgBox(64+262144, Default, "Shift+s sent to application",2) Case Else If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed, 15) If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.", 15) EndSwitch EndFunc ;==>_HotKey While Sleep(100) ; here should be your application. WEnd ; meanwhile, here is a dummy loop. #cs place cursor in next line before pressing F5 (run) SSSS #ce Joan6149 1 App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Joan6149 Posted December 2, 2019 Author Share Posted December 2, 2019 Thanks Exit, the problem is that I have to send text with "S" whith Send() function, I enclose the following code to explain it: or $content In $todos ;~ ConsoleWrite($content & @LF) sleep(500) if $first == true Then $first = false ContinueLoop EndIf if($desc == false) Then Send($content) Send("{ENTER}") $desc = true sleep(500) Else MouseClick($MOUSE_CLICK_LEFT, 47, 44, 1) $denominacion = "$$" & $content ;~ Send({CAPSLOCK}) ;~ Send("{CAPSLOCK on}") ;~ Send("$$" & $content) ConsoleWrite($denominacion & @LF) Send($denominacion,0) MouseClick($MOUSE_CLICK_LEFT, 89, 42, 1) sleep(500) WinWait("[CLASS:ThunderRT6FormDC]", "", 10) $desc = false EndIf Next $content It is capitalized text, obtained from a list of a txt file. This text includes the "S" which is the letter you do not write. How could I fix it? Thank you very much! Link to comment Share on other sites More sharing options...
Danp2 Posted December 2, 2019 Share Posted December 2, 2019 Seems like the simplest answer would be to use a different hotkey (preferably one using Alt or Ctrl). Other option would be to clear the hotkey at the beginning of your function and then reestablish it when exiting. Latest Webdriver UDF Release Webdriver Wiki FAQs 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