Jump to content

Searching...


Gaboury
 Share

Recommended Posts

  • Replies 41
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

:whistle: 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 :dance:

Edited by Gaboury
Link to comment
Share on other sites

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 :whistle:

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 by Gaboury
Link to comment
Share on other sites

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 :whistle:

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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 :whistle:

<{POST_SNAPBACK}>

on your computer press the following

Start > All Programs > Autoit v3 > Autoit Help File

when that loads then press the "search" tab

then type in "ini" and press "List Topics"

**** you can do this with any word you want

thats what i do all the time

8)

NEWHeader1.png

Link to comment
Share on other sites

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 :whistle:

<{POST_SNAPBACK}>

here is a small script i was playing with earlier

IniWrite("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])
Next

8)

NEWHeader1.png

Link to comment
Share on other sites

I got it! I got it! I got it! I got it!!!

Here's the code :dance:

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 :whistle: I finally found the rest by myself, thanks for not telling me more than that... You are a great guy :dance: 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 :P]

Edited by Gaboury
Link to comment
Share on other sites

Yeah good idea :whistle: Thanks :dance:

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:

#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

:dance:

Link to comment
Share on other sites

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

maybe this

#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)

NEWHeader1.png

Link to comment
Share on other sites

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

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... :whistle: 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 :dance:

Thanks for all and see ya :dance:

- Gaboury.

Link to comment
Share on other sites

  • Moderators

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 :whistle:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...