Developers Jos Posted May 18, 2004 Developers Share Posted May 18, 2004 No it had all the folders and files in the C: drive . I would like just gmd files to show .or search for . But I must thank you guys as this is helping me learn ..Maybe you can post what script you have now.... then its easier to look where it might go wrong...... 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...
bobheart Posted May 18, 2004 Author Share Posted May 18, 2004 Here is what I have so far . expandcollapse popup;Generated with AutoBuilder 0.3 Opt("GUICoordMode", 1) Opt("GUINotifyMode", 1) GuiCreate("MyGUI", 392,477,10,10,0x04CF0000) $button_1 = GUISetControl("button", "Button 1", 10,30, 70,20) $button_2 = GUISetControl("button", "Button 2", 10,60, 70,20) $input_1 = GUISetControl("input", "Input 1", 160,50, 170,20) $button_3 = GUISetControl("button", "Button 3", 340,50, 50,20) $edit_1 = GUISetControl("edit", "Edit 1", 160,100, 170,220) GuiShow() While 1 sleep(100) $msg = GuiMsg(0) Select Case $msg = -3 Exit Case $msg = $button_1 MsgBox(1,"Edit 1 info",GUIRead ($edit_1)) MsgBox(1,"Input info",GUIRead ($input_1)) Case $msg = $button_2 dosomething() Case $msg = $input_1 ;; Case $msg = $button_3 RunWait(@ComSpec & " /c dir *.gmd /b c:\ >c:\tempfile11.txt","",@SW_HIDE) $_out=fileread("c:\tempfile11.txt",FileGetSize("c:\tempfile11.txt")) ControlSetText ("MyGUI","","Edit2",$_out) run('notepad.exe "c:\tempfile11.txt"') Case $msg = $edit_1 Case $msg = $edit_1 Case $msg = $edit_1 ;;; Case $msg = $edit_1 ;;; EndSelect WEnd Exit Func dosomething() $_var = FileOpenDialog("What files?", "C:\Windows\", "gmd (*.gmd;*.gmd)", 1 + 4 ) $Avar=StringSplit($_var,"|") $_out="" For $i=2 To $Avar[0] $_out=$_out & $Avar[1] & "\" & $Avar[$i] & @CRLF Next ControlSetText ("MyGUI","","Edit2",$_out) EndFunc Link to comment Share on other sites More sharing options...
Developers Jos Posted May 18, 2004 Developers Share Posted May 18, 2004 this is your actual dir command: dir *.gmd /b c:\ think that should be: dir /b c:\*.gmd 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...
emmanuel Posted May 18, 2004 Share Posted May 18, 2004 since the folder you're doing the autoit from is probably not the folder cmd is located in, you should specify which folder you want the dir done on, you could use the @scriptdir to do that, if you're trying to do it in the same folder the script runs from: RunWait(@ComSpec & " /c dir" & @scriptdir & "\*.gmd /b c:\ >c:\tempfile11.txt","",@SW_HIDE) "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bobheart Posted May 18, 2004 Author Share Posted May 18, 2004 Is there a way to put the drive letter in a input box and then it would search that drive ? Link to comment Share on other sites More sharing options...
emmanuel Posted May 18, 2004 Share Posted May 18, 2004 yeah, just use an InputBox or FileSelectFolder and put that var in the place of the @scriptdir in that example above... to see how to do that, check out the help file. "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
bobheart Posted May 18, 2004 Author Share Posted May 18, 2004 yeah, just use an InputBox or FileSelectFolder and put that var in the place of the @scriptdir in that example above... to see how to do that, check out the help file.I'm sorry you lost me there . I have to see it to be able to do it .. If you see my first post here you will know why . Link to comment Share on other sites More sharing options...
emmanuel Posted May 18, 2004 Share Posted May 18, 2004 I'm sorry you lost me there . I have to see it to be able to do it .. If you see my first post here you will know why .go read the help file for InputBox and FileSelectFolder, they both have examples you should be able translate into using for your puposes... also read the Using AutoIt, Language Reference and Keyword/Statement Referance sections, I printed them out to read, understanding what's in there greatly helps in creating new scripts on your own. "I'm not even supposed to be here today!" -Dante (Hicks) 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