mattfaust Posted September 21, 2007 Share Posted September 21, 2007 is there a way to select a file by a button? I cant seem to the command Link to comment Share on other sites More sharing options...
Monamo Posted September 21, 2007 Share Posted September 21, 2007 is there a way to select a file by a button?I cant seem to the commandFileOpenDialog() ? - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
BigDod Posted September 21, 2007 Share Posted September 21, 2007 How about #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 292, 150, 193, 115) $Button1 = GUICtrlCreateButton("Select File", 88, 32, 105, 33, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $message = "Hold down Ctrl or Shift to choose multiple files." $var = FileOpenDialog($message, @WindowsDir & "\", "Images (*.jpg;*.bmp)", 1 + 4) If @error Then MsgBox(4096, "", "No File(s) chosen") Else $var = StringReplace($var, "|", @CRLF) MsgBox(4096, "", "You chose " & $var) EndIf EndSwitch WEnd Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother 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