kingzinkk Posted February 26, 2021 Share Posted February 26, 2021 Guys i need help with my script , i tried to do this to when i press f1 the script press shift and click on the screen , move to another pixel and click again , with shift pressed , but when i try it the shift doesnt work. There's my code, Can someone help me with that ? HotKeySet("{F1}", "use") HotKeySet("+{F5}","exitt") $sla = FALSE While(1) If $sla = TRUE THEN Send("{SHIFTDOWN}") MouseClick("left",868,480) MouseClick("left",953,480) MouseClick("left",1033,480) MouseClick("left",868,557) MouseClick("left",953,557) MouseClick("left",1033,557) MouseClick("left",838,612) MouseClick("left",953,612) MouseClick("left",1033,612) Send("{SHIFTUP}") Else Sleep(100) EndIf WEnd Func use() If $sla = TRUE THEN $sla = FALSE ElseIf $sla = FALSE THEN $sla = TRUE EndIf EndFunc Func exitt() Exit EndFunc Link to comment Share on other sites More sharing options...
Nine Posted February 26, 2021 Share Posted February 26, 2021 What application are you trying to automate ? Without knowing it, that will be very hard to understand where is the issue. You should also consider using other tools than MouseClick as this approach is truly not the best way to automate an application. “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...
Sidley Posted February 26, 2021 Share Posted February 26, 2021 The script seems to work for me, but as Nine said, it's difficult to know if it's doing what you want it to do without you telling us what you want it to do. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 26, 2021 Developers Share Posted February 26, 2021 20 minutes ago, Sidley said: The script seems to work for me, Wondering how you established that unless the automate the same "application"? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Sidley Posted February 26, 2021 Share Posted February 26, 2021 It works as in it shift-clicks, moves, shift-clicks, moves, ad nauseum. No idea what the end goal is, but seems to function as reading through the script would suggest it does. I used the term 'work' loosely, perhaps 'function' would be a better description. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 26, 2021 Developers Share Posted February 26, 2021 Not trying to be a smart-ass, but I was wondering how you determined that is was actually do a shift+Click with that code? I am not bothered about the OP's request myself as I guess this is a game related thing anyways as I can't think of any other application requiring this. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JockoDundee Posted February 26, 2021 Share Posted February 26, 2021 (edited) 6 hours ago, Jos said: as I guess this is a game related thing anyways Coordinates are consistent with strafing. Edited February 26, 2021 by JockoDundee Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Sidley Posted March 1, 2021 Share Posted March 1, 2021 With the script running on the desktop, all files between the given positions would highlight (Yes, I have way too many files on my desktop). 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