Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 Thanks Do you have msn or icq? You'd be to me such a good help buddy... :roll: Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 Thanks Do you have msn or icq? You'd be to me such a good help buddy... :roll:<{POST_SNAPBACK}>nopper... i use this forum only 8)( i get points here...lol) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 (edited) Okay... But now I don't find the directory where the .txt is located... :/ searched in windows\temp and didn't find there neither :/ Any ideas? [Edit] nvm I got it..changed the path to homedrive instead of temp and I got it to work Edited September 3, 2005 by Gaboury Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 (edited) For now I have that: runWait(@comspec & ' /c dir /b /s ' & @HomeDrive & '\mirc.exe > "' & @HomeDrive & '\result.txt"', @HomeDrive, @SW_HIDE) $resultopen = FileOpen("c:\result.txt", 0) I had more but it wasn't working so I removed it :/ I really suck...it takes a bit of time before I understand but once I've understood I tried with "@homedrive\result.txt" but it was returning -1 so it wasn't that...and with that one it returns 0 so it must be finding it ^^ Edited September 3, 2005 by Gaboury Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 (edited) For now I have that:runWait(@comspec & ' /c dir /b /s ' & @HomeDrive & '\mirc.exe > "' & @HomeDrive & '\result.txt"', @HomeDrive, @SW_HIDE) $resultopen = FileOpen("c:\result.txt", 0)I had more but it wasn't working so I removed it :/ I really suck...it takes a bit of time before I understand but once I've understood I tried with "@homedrive\result.txt" but it was returning -1 so it wasn't that...and with that one it returns 0 so it must be finding it ^^<{POST_SNAPBACK}>remember this ???Run("notepad.exe " & @TempDir & "\result.txt")why not try this$resultopen = FileOpen(@TempDir & "\result.txt", 0)ok.....you changed the output...then use this$resultopen = FileOpen(@HomeDrive & '\result.txt", 0 )#3$resultread = FileReadLine($resultopen)8) Edited September 3, 2005 by Valuater Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 I can't believe how stupid I am...and now how do I put that into the ini file?!? if I do ini write I need like everything so I have no idea :/ Filewriteini isn't a valid cmd Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 I can't believe how stupid I am...and now how do I put that into the ini file?!?if I do ini write I need like everything so I have no idea :/Filewriteini isn't a valid cmd <{POST_SNAPBACK}>on your computer press the followingStart > All Programs > Autoit v3 > Autoit Help Filewhen that loads then press the "search" tabthen type in "ini" and press "List Topics"**** you can do this with any word you wantthats what i do all the time8) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 Yeah I know that...but there is only iniwrite and it really sucks because I don't know how to enter enverything I need...ha...I think I got it..wait I'll edit when I have it Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 Yeah I know that...but there is only iniwrite and it really sucks because I don't know how to enter enverything I need...ha...I think I got it..wait I'll edit when I have it <{POST_SNAPBACK}>here is a small script i was playing with earlierIniWrite("C:\Temp\myfile.ini", "section2", "key", "this is a new value, test for levels, third info, and a fourth") $read = IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound") $names = StringSplit($read, ",") for $i = 1 to $names[0] MsgBox(0,"names", $names[$i]) Next8) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 (edited) I got it! I got it! I got it! I got it!!! Here's the code runWait(@comspec & ' /c dir /b /s ' & @HomeDrive & '\mirc.exe > "' & @HomeDrive & '\result.txt"', @HomeDrive, @SW_HIDE) $resultopen = FileOpen(@HomeDrive & "\result.txt", 0 ) $resultread = FileReadLine($resultopen) DirCreate (@HomeDrive & "\mIRCScrimFinder\") IniWrite(@homeDrive & "\mIRCScrimFinder\config.ini", "Path", "$mircpath", $resultread) MsgBox(0, "Detected.", "mIRC Scrim Finder detected the path to your mIRC executable. The starting is now only a question of seconds.", 2) Thank you so much buddy I finally found the rest by myself, thanks for not telling me more than that... You are a great guy Thanks again [Edit: I let the page opened to be sure not to refresh it not to tempt me to copy what you'd have answered ] Edited September 3, 2005 by Gaboury Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 Cool.... maybe do this too MsgBox(0, "Detected.", "mIRC Scrim Finder detected the path to your mIRC executable." & @CRLF & " The starting is now only a question of seconds.", 2) 8) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 Yeah good idea Thanks Okay...so now I have another problem :/ I'll paste my code here and please try to help me: When I press the Start Finding button, I'd like the progress bar to start, and then when I press the stop button it stops it... but now it doesn't work and once it's started I cannot even close it with the "x", I need to ctrl-alt-delete it... Here's the code: expandcollapse popup#include <GuiConstants.au3> If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 ;-------------------------------------------------------------------------------------------------------------------------------------------------------------- GUI GuiCreate("mIRC Scrim Auto Searcher", 365, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Picture = GuiCtrlCreatePic("C:\Documents and Settings\Jaimie\Bureau\mircscrim.jpg", 20, 10, 325, 65) $input1 = GuiCtrlCreateInput(".: 5 vs 5 | East | Yours | Cal-I | MAP | PM ME :.", 130, 85, 215, 22) $label1 = GuiCtrlCreateLabel("Hi. This is my first program. I made this mIRC Auto-Scrim Searcher to make it easier to find scrims. Just paste whatever line you'd have posted on mIRC to find a scrim and then press Start. It will also log you in the good mIRC server and make sure you don't bypass the flood protection.", 20, 150, 340, 80) $startbutton = GuiCtrlCreateButton("Start Finding!", 130, 116, 96, 20) $stopbutton = GuiCtrlCreateButton("Stop Finding!", 249, 116, 96, 20) $progress = GUICtrlCreateProgress( 20, 116, 96, 20) GUISetState() ;-------------------------------------------------------------------------------------------------------------------------------------------------------------- GUI END While 1 $msg= GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $startbutton $surebox = MsgBox(4, "Are you sure?", "Is this really the text you want to enter? " & GUICtrlRead($input1)) If $surebox = 6 Then msgbox(0, "Accepted.", "mIRC should start searching for a scrim within 30 seconds or so. This window will close itself automatically.", 3) Call("startit") Call("progressbar1") ElseIf $surebox = 7 Then Call("Stopit") MsgBox(0, "Canceled.", "The search was canceled. Please change your input and press Start Finding again. This window will close itself automatically.", 3) EndIf EndSelect WEnd Func progressbar1() $wait = 20; Wait time between each Progress Step $initialvalue = 0; Initial Value of the Progress Bar Do $msg = GUIGetMsg() For $progressvalue = $initialvalue to 100 GUICtrlSetData($progress, $progressvalue) Sleep($wait) Next if $progressvalue >100 Then For $progressvalue = $initialvalue To 0 Step -1 Next Call("progressbar1") EndIf until $msg = $GUI_EVENT_CLOSE EndFunc Func startit() MsgBox(0, "Detecting...", "Now searching the path to your mIRC executable.", 2) Sleep(1000) runWait(@comspec & ' /c dir /b /s ' & @HomeDrive & '\mirc.exe > "' & @HomeDrive & '\result.txt"', @HomeDrive, @SW_HIDE) $resultopen = FileOpen(@HomeDrive & "\result.txt", 0 ) $resultread = FileReadLine($resultopen) DirCreate (@HomeDrive & "\mIRCScrimFinder\") IniWrite(@homeDrive & "\mIRCScrimFinder\config.ini", "Path", "$mircpath", $resultread) MsgBox(0, "Detected.", "mIRC Scrim Finder detected the path to your mIRC executable." & @CRLF & "The starting is now only a question of seconds.", 2) Endfunc Exit Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 first.. when a function is in operation you cannot call the same function.. i have to look more also....hold on 8) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 Okidoki! If you tell me to add commands or anything, don't forget to explain me why cause I wanna understand! Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 (edited) this is first i put a drop-down list ( combobox) it looks better GuiCreate("mIRC Scrim Auto Searcher", 365, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Picture = GuiCtrlCreatePic("C:\Documents and Settings\Jaimie\Bureau\mircscrim.jpg", 20, 10, 325, 65) $input1a = GUICtrlCreateCombo("Chose from this list below", 130, 85, 215, 22) $input1 = GUICtrlSetData(-1,".: 5 vs 5 | East | Yours | Cal-I | MAP | PM ME :.") $label1 = GuiCtrlCreateLabel("Hi. This is my first program. I made this mIRC Auto-Scrim Searcher to make it easier to find scrims. Just paste whatever line you'd have posted on mIRC to find a scrim and then press Start. It will also log you in the good mIRC server and make sure you don't bypass the flood protection.", 20, 150, 340, 80) $startbutton = GuiCtrlCreateButton("Start Finding!", 130, 116, 96, 20) $stopbutton = GuiCtrlCreateButton("Stop Finding!", 249, 116, 96, 20) $progress = GUICtrlCreateProgress( 20, 116, 96, 20) GUISetState() let me know if that is what you wanted still looking to... 8) Edited September 3, 2005 by Valuater Link to comment Share on other sites More sharing options...
Valuater Posted September 3, 2005 Share Posted September 3, 2005 maybe this expandcollapse popup#include <GuiConstants.au3> ;If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 ;-------------------------------------------------------------------------------------------------------------------------------------------------------------- GUI GuiCreate("mIRC Scrim Auto Searcher", 365, 316,(@DesktopWidth-392)/2, (@DesktopHeight-316)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Picture = GuiCtrlCreatePic("C:\Documents and Settings\Jaimie\Bureau\mircscrim.jpg", 20, 10, 325, 65) $input1a = GUICtrlCreateCombo("Chose from this list below", 130, 85, 215, 22) $input1 = GUICtrlSetData(-1,".: 5 vs 5 | East | Yours | Cal-I | MAP | PM ME :.") $label1 = GuiCtrlCreateLabel("Hi. This is my first program. I made this mIRC Auto-Scrim Searcher to make it easier to find scrims. Just paste whatever line you'd have posted on mIRC to find a scrim and then press Start. It will also log you in the good mIRC server and make sure you don't bypass the flood protection.", 20, 150, 340, 80) $startbutton = GuiCtrlCreateButton("Start Finding!", 130, 116, 96, 20) $stopbutton = GuiCtrlCreateButton("Stop Finding!", 249, 116, 96, 20) $progress = GUICtrlCreateProgress( 20, 116, 96, 20) GUISetState() ;-------------------------------------------------------------------------------------------------------------------------------------------------------------- GUI END While 1 $msg= GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $startbutton $surebox = MsgBox(4, "Are you sure?", "Is this really the text you want to enter? " & GUICtrlRead($input1)) If $surebox = 6 Then msgbox(0, "Accepted.", "mIRC should start searching for a scrim within 30 seconds or so. This window will close itself automatically.", 3) Call("startit") ;Call("progressbar1") ElseIf $surebox = 7 Then ;Call("Stopit") MsgBox(0, "Canceled.", "The search was canceled. Please change your input and press Start Finding again. This window will close itself automatically.", 3) EndIf EndSelect WEnd #cs Func progressbar1() $wait = 20; Wait time between each Progress Step $initialvalue = 0; Initial Value of the Progress Bar Do $msg = GUIGetMsg() For $progressvalue = $initialvalue to 100 GUICtrlSetData($progress, $progressvalue) Sleep($wait) Next if $progressvalue >100 Then For $progressvalue = $initialvalue To 0 Step -1 Next Call("progressbar1") EndIf until $msg = $GUI_EVENT_CLOSE EndFunc #ce Func startit() GUICtrlSetData($progress, 10) MsgBox(0, "Detecting...", "Now searching the path to your mIRC executable.", 2) GUICtrlSetData($progress, 20) Sleep(1000) GUICtrlSetData($progress, 30) runWait(@comspec & ' /c dir /b /s ' & @HomeDrive & '\mirc.exe > "' & @HomeDrive & '\result.txt"', @HomeDrive, @SW_HIDE) GUICtrlSetData($progress, 60) $resultopen = FileOpen(@HomeDrive & "\result.txt", 0 ) GUICtrlSetData($progress, 70) $resultread = FileReadLine($resultopen) GUICtrlSetData($progress, 80) DirCreate (@HomeDrive & "\mIRCScrimFinder\") GUICtrlSetData($progress, 90) IniWrite(@homeDrive & "\mIRCScrimFinder\config.ini", "Path", "$mircpath", $resultread) GUICtrlSetData($progress, 100) MsgBox(0, "Detected.", "mIRC Scrim Finder detected the path to your mIRC executable." & @CRLF & "The starting is now only a question of seconds.", 2) Endfunc Exit 8) Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 I don't like it...moreover, they need to input everything .: # vs # | Where | What map | Skill | Private Message me :. not only one of those... put that into a .au3 file and exec it, you'll see that when you press start finding etc it works well, but then you say yes, and it works, but if you do "stop" or you press the red "x" button it won't close... I tried to fix it like during 1 hour this afternooon and I got pissed ^^ Link to comment Share on other sites More sharing options...
Gaboury Posted September 3, 2005 Author Share Posted September 3, 2005 well you got it a bit but I want it to stop when I tell him, not when he has done one bar...I wanted it to continue without stopping... SO now let,s try to find how to stop it by pressing the stop button... I'll be back 2night, I have to go outside a bit cause now I'm getting tired of being in front of a computer Thanks for all and see ya - Gaboury. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 3, 2005 Moderators Share Posted September 3, 2005 I don't like it...moreover, they need to input everything.: # vs # | Where | What map | Skill | Private Message me :.not only one of those... put that into a .au3 file and exec it, you'll see that when you press start finding etc it works well, but then you say yes, and it works, but if you do "stop" or you press the red "x" button it won't close... I tried to fix it like during 1 hour this afternooon and I got pissed ^^<{POST_SNAPBACK}>Hmm... 'Gift Horse' comes to mind Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
w0uter Posted September 3, 2005 Share Posted September 3, 2005 Cal-I, pssh. you mean:$input1 = GUICtrlSetData(-1,".: 5 vs 5 | East | Yours | Cal-O | MAP | PM ME :.") My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll 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