Redundant Posted March 20, 2010 Share Posted March 20, 2010 This script is meant to be used on a full screen program. It works fine on 64bit yet it does not work on the 32bit. It will just spam into a window. #Include <Misc.au3> While 1 If _IsPressed(76) then click() ; F7 key Sleep (25) WEnd Func click() While 1 Send ("w") Send ("w") Send ("e") Send ("r") Wend EndFunc What seems to be the problem? Link to comment Share on other sites More sharing options...
KaFu Posted March 20, 2010 Share Posted March 20, 2010 You compiled it as 64bit? Then it can not run on 32bit machines. Compile as 32bit it can run on 64bit OS as well. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Redundant Posted March 20, 2010 Author Share Posted March 20, 2010 I compiled and ran this code on a 32bit machine. It does not send these letters to the full screen application. On a 64bit machine, it works. I even forced the program into windowed mode. That didn't change a thing. Link to comment Share on other sites More sharing options...
Kip Posted March 20, 2010 Share Posted March 20, 2010 How do you know the difference between 32 and 64 bit is the problem? I assume you tested your program on two machines. I bet it is the fact that they are two completely different machines that causes the bug. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Sherva Posted May 31, 2010 Share Posted May 31, 2010 I'm sorry to up this topic, but i've got the same problem of this guy. AutoIt works good on every 64 pc's of my friends, but, on the 32, when u try to start it, it comes this error:Thank you for the attention. Link to comment Share on other sites More sharing options...
Juvigy Posted June 1, 2010 Share Posted June 1, 2010 Do you have the source code? It looks like a bad programming array error. Link to comment Share on other sites More sharing options...
Sherva Posted June 1, 2010 Share Posted June 1, 2010 This isn't the complete source code, but the code segment concerning the discussed error (variable declaration and its usage as array): HotKeySet("{NUMPAD1}", "start") [...] Global $O[2] Global $M_coord[2] [...] while (1) WEnd Func start() calc() [...] EndFunc Func calc() $O=PixelSearch(0,0,100,100,11577778) $M_coord[0]=$O[0]+670 ; <---- Error! $M_coord[1]=$O[1]+40 EndFunc I know the possible runtime error ($O not an array if PixelSearch() doesn't find any corresponding pixel) isn't handled here. But my real problem is that...on a 64bit OS the script works greatly, but the same on 32bit gives me the posted error pressing 'NUMPAD1' when the script's running. Am I using wrong array declaration? Is there a specific 32bit obligation form? (Mmm...I'm not sure that's real English... xD ) Link to comment Share on other sites More sharing options...
Kip Posted June 1, 2010 Share Posted June 1, 2010 (edited) I'm putting all my money on that PixelSearch doesn't return an array when an error occurs. Edited June 1, 2010 by Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Sherva Posted June 1, 2010 Share Posted June 1, 2010 I already knew that: $O not an array if PixelSearch() doesn't find any corresponding pixel And I'm quite sure that the error occurs because PixelSearch() doesn't find any matching pixel, and so $O isn't initialized as an array. But my problem still remains on the different OS... But you post make me think about this function...and so I wrote a little stupid script: $O=PixelSearch(0,0,1000,800,2449372) MouseMove($O[0],$O[1]) And it returns the same kind of error. I'm 100% sure that the decimal color exists on the screen (it's the light blue of Windows XP window title bar, and I get it through PixelGetColor()). And obviously...it works on 64bit! So now I'm really puzzled about this AutoIT function and its compatibility with x86 System! Link to comment Share on other sites More sharing options...
Kip Posted June 2, 2010 Share Posted June 2, 2010 Are you sure both computers have the same style applied? You might want to increase the shade variation. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
GEOSoft Posted June 2, 2010 Share Posted June 2, 2010 Don't create and then try to use an array without checking to see if an array was created. $O=PixelSearch(0,0,1000,800,2449372) If IsArray($O) Then MouseMove($O[0],$O[1]) EndIf George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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