layer Posted November 17, 2004 Share Posted November 17, 2004 Whats wrong with this code...I want it so that IF the user presses mouse1, then it will get the possition its at, and then hit mouse1 10 times, but instead, its just hitting mouse1 even if i don't press mouse1 HotKeySet("^!o", "MyExit") Func _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc While 1 $getpos= MouseGetPos () Select Case _IsPressed('01') MouseClick ("left", $getpos[0], $getpos[1], 10, 0) EndSelect WEnd Func MyExit() Exit EndFunc Could someone tell me why it does this, thanks. FootbaG Link to comment Share on other sites More sharing options...
layer Posted November 17, 2004 Author Share Posted November 17, 2004 Woo hoo! It works, thanks larry! Also, I'm trying to help The_Lord_Merphy guy below....He's right, you can't open a .ini file with FileOpen...Why? FootbaG Link to comment Share on other sites More sharing options...
Developers Jos Posted November 17, 2004 Developers Share Posted November 17, 2004 Also, I'm trying to help The_Lord_Merphy guy below....He's right, you can't open a .ini file with FileOpen...Why?<{POST_SNAPBACK}>this works for me ... so what isn't working for you ??IniWrite("DEMO.INI",'test','testkey','testval') $file = FileOpen("DEMO.INI", 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ; Read in lines of text until the EOF is reached While 1 $line = FileReadLine($file) If @error = -1 Then ExitLoop MsgBox(0, "Line read:", $line) Wend FileClose($file) 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...
Valik Posted November 17, 2004 Share Posted November 17, 2004 Please don't tell me you're both being morons and assuming that "opening" a file means opening it in a text editor like Notepad or SciTE. Thats not what you mean, I hope, right? Please tell me its not. Link to comment Share on other sites More sharing options...
layer Posted November 17, 2004 Author Share Posted November 17, 2004 Ooops, looks like I am a moron... =) Sorry, but thats what I was trying to do, lol. =D FootbaG Link to comment Share on other sites More sharing options...
the_lord_mephy Posted November 17, 2004 Share Posted November 17, 2004 Well Valik, I was getting lonely without you saying anything about my questions. Thanks for that My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
this-is-me Posted November 17, 2004 Share Posted November 17, 2004 That makes 2 morons. Layer and Python:http://www.autoitscript.com/forum/index.php?showtopic=6077 Who else would I be? Link to comment Share on other sites More sharing options...
killaz219 Posted November 17, 2004 Share Posted November 17, 2004 (edited) Lol, you need to do something like RunWait(@COMSPEC & " /c Start c:/thefile.ini") To run the file..... Edited November 17, 2004 by killaz219 Link to comment Share on other sites More sharing options...
the_lord_mephy Posted November 17, 2004 Share Posted November 17, 2004 Or you can do Run('notepad "SCRIPT NAME HERE"') As I stated earlier in one of these threads. My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
killaz219 Posted November 17, 2004 Share Posted November 17, 2004 (edited) Or you can doRun('notepad "SCRIPT NAME HERE"')As I stated earlier in one of these threads.<{POST_SNAPBACK}>I didnt see you state that, but I guess thats another way. But the way I posted is better for things that dont open with notepad also, simply because Windows may not know where to find it (unless you hard code the path ex run('c:/windows/notepad' 'scriptpath') Edited November 17, 2004 by killaz219 Link to comment Share on other sites More sharing options...
SlimShady Posted November 18, 2004 Share Posted November 18, 2004 This is better: Run('notepad "' & @ScriptFullPath & '"') Link to comment Share on other sites More sharing options...
the_lord_mephy Posted November 18, 2004 Share Posted November 18, 2004 Yeah that's what I posted My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] 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