newbie_pete Posted February 2, 2017 Share Posted February 2, 2017 Hi. First I want to say that I am no expert on programming. and i really really want this to work Because I had a stroke 3½ years ago and got paralyzed on my left side of my body, its much better now but i still have problems typing on the keyboard with botghs hand. witch is why I want to get it to work. So i can Automise stuff thats hard for me. In qwould like to have a script That fill in forms that i use frequently. I really appreciates you ppl that writes these scripts and/or help newbies like my self withj problems. There is a few things that will make the script not to work! You cant use extend desktop( 2 screens extended),2 screens with duplicate works So here's a working example It scans the entire screen #include <ImageSearch.au3> HotKeySet("p", "checkForImage") global $y = 0, $x = 0 Func checkForImage() Local $search = _ImageSearch('checkImage.bmp', 0, $x, $y, 0) If $search = 1 Then MouseMove($x, $y, 10) EndIf EndFunc while 1 sleep(200) WEnd Here is another solution for scanning an area. #include <ImageSearch.au3> HotKeySet("p", "checkForImage") global $y = 0, $x = 0 Func checkForImage() local $search = _ImageSearchArea('check5.bmp', 1, 800, 40, 900, 80, $x, $y, 0) If $search = 1 Then MouseMove($x, $y, 10) EndIf EndFunc while 1 sleep(200) WEnd There are a few common errors i will out the solution here when someone comes up with one. Here we have one of the errors, lets call it Error 1 Quote Subscript used on non-accessible variable.:If $result[0] = "0" Then Return 0If $result^ ERROR Quote Solution:currently none know solution. If someone posts a solution i'll put it here Thats all i had to say. Have a nice day to you all. Link to comment Share on other sites More sharing options...
newbie_pete Posted February 2, 2017 Author Share Posted February 2, 2017 Me myself dont get it to work. Im sittin on a win 7 x64 computer. This is my script #include <ImageSearch.au3> HotKeySet("c", "close") HotKeySet("p", "checkForImage") global $y = 0, $x = 0 Func checkForImage() $file = 'fish.png' MsgBox(0,"",$file) local $search = _ImageSearch($file, 1, $x, $y, 0) If $search = 1 Then MsgBox(0, "ppsearch") MsgBox(0, $x, $y) MouseMove($x, $y, 10) EndIf MsgBox(0,"searchgg",$search) EndFunc Func close() Exit EndFunc while 1 sleep(200) WEnd Nothing happen the script just stops after like 10 sec, I dont know how to debug tbh. Hope someone can point me in the right direction. peace out Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 2, 2017 Moderators Share Posted February 2, 2017 Since you said you want to fill in forms, I will offer that ImageSearch is about the worst way you can go about it. Is this a desktop application with a form in it, or a web form? There are much easier ways to accomplish what you're after if you can give us some more details. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
newbie_pete Posted February 2, 2017 Author Share Posted February 2, 2017 one od the thing i want to ue it for i thaat, ye. So till i want to make it work.. But ure i take the form olution Link to comment Share on other sites More sharing options...
newbie_pete Posted February 2, 2017 Author Share Posted February 2, 2017 web forms Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 2, 2017 Moderators Share Posted February 2, 2017 Ok, again, you're not exactly giving us a lot to go on. How about a screenshot of the web form - no two forms are going to be exactly the same. Help us help you. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
newbie_pete Posted February 2, 2017 Author Share Posted February 2, 2017 Like I said my main goal is to fix image search and then everything will be good.. Link to comment Share on other sites More sharing options...
newbie_pete Posted February 2, 2017 Author Share Posted February 2, 2017 15 minutes ago, JLogan3o13 said: Ok, again, you're not exactly giving us a lot to go on. How about a screenshot of the web form - no two forms are going to be exactly the same. Help us help you. this thread is about image search and how to soulve errors and stuff. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 2, 2017 Developers Share Posted February 2, 2017 Funny as it seems you tried the same previously under another account. Why? Jos 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...
Moderators Melba23 Posted February 2, 2017 Moderators Share Posted February 2, 2017 Jos, Nice spot. newbie_pete, After coming over the innocent in our PM exchange before you posted this thread, you had best come up with a very good explanation to Jos' question. M23 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...
Moderators JLogan3o13 Posted February 2, 2017 Moderators Share Posted February 2, 2017 Very nice catch. newbie_pete, you now have the attention of the entire moderation staff. Make it a good one if you expect to stay on this forum. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
newbie_pete Posted February 3, 2017 Author Share Posted February 3, 2017 12 hours ago, Jos said: Funny as it seems you tried the same previously under another account. Why? Jos well yeah, i gfelt a little bit ashamed because of my behavor so i wanted a new start. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 3, 2017 Moderators Share Posted February 3, 2017 newbie_pete, So you were "ashamed" of having had 2 threads being locked - so "ashamed" that you created a new account and promptly posted the same question again? You should be even more "ashamed" of offering such an appalling excuse for an excuse. We do not permit multiple accounts, nor questions regarding gamebots - as the Forum rules to which I linked you when your first thread was locked clearly explain. But you seem incapable of reading these rules, or understanding them, or perhaps both. And given your evident distain for actually learning anything about AutoIt for yourself, I see little point in you remaining part of this community. Both accounts permanently banned. M23 EmilyLove 1 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...
Recommended Posts