arthure Posted April 16, 2020 Share Posted April 16, 2020 Any clue how to edit this simple code to make it work only during "N" button hold? Opt("TrayAutoPause", 0) HotKeySet("{=}", "Start") While 1 Sleep(1) WEnd Func Start() While 1 $pos = PixelSearch(955, 535, 965, 545, 0xafaf26, 25) If IsArray ($pos) Then MouseClick("left") EndIf WEnd EndFunc Func _Pause() Pause EndFunc Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted April 16, 2020 Share Posted April 16, 2020 @arthure There are many more ways to automate a program without using PixelSearch. Which program are you trying to automate? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
arthure Posted April 16, 2020 Author Share Posted April 16, 2020 Just now, FrancescoDiMuro said: @arthure There are many more ways to automate a program without using PixelSearch. Which program are you trying to automate? It works for me, i just want it to work during N button hold, not all the time Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted April 16, 2020 Share Posted April 16, 2020 @arthure Please reply at the question I just made to you; otherwise, good luck with your script Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
arthure Posted April 16, 2020 Author Share Posted April 16, 2020 1 minute ago, FrancescoDiMuro said: @arthure Please reply at the question I just made to you; otherwise, good luck with your script I don't know what you mean, i just want whole script to work when i hold N button, nothing more. Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted April 16, 2020 Share Posted April 16, 2020 @arthure Well, since you are surely trying to use that script for a game (and the evidence has been taken), I just reported the thread so a Moderator can step in and legitimate the question you made on the Forums. Good l(o)uck Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
arthure Posted April 16, 2020 Author Share Posted April 16, 2020 1 minute ago, FrancescoDiMuro said: @arthure Well, since you are surely trying to use that script for a game (and the evidence has been taken), I just reported the thread so a Moderator can step in and legitimate the question you made on the Forums. Good l(o)uck What's wrong with that? Is it not allowed to ask such question or what? Link to comment Share on other sites More sharing options...
Danp2 Posted April 16, 2020 Share Posted April 16, 2020 FrancescoDiMuro 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
arthure Posted April 16, 2020 Author Share Posted April 16, 2020 Uh okay if its considered bad here and not informative then i will pass i guess Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 16, 2020 Moderators Share Posted April 16, 2020 (edited) Hi, I see nothing in this thread which suggests that the script is to be used for a game. Please only report threads with prima facie evidence of such. And please do not post multiple leading questions trying to trap members into admitting that their script is in fact a gamebot - if it is not obvious from the posted code the thread is legal. M23 Edited April 16, 2020 by Melba23 Grammar! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
TheXman Posted April 16, 2020 Share Posted April 16, 2020 24 minutes ago, arthure said: Any clue how to edit this simple code to make it work only during "N" button hold? Here's a clue... _IsPressed() CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
Skysnake Posted April 17, 2020 Share Posted April 17, 2020 You will need two parts to this script. The outer function runs continuously, and looks out for that key press (See TheXman above). Then on press, run the second function (your script) S Skysnake Why is the snake in the sky? 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