Samir90 Posted September 9, 2013 Share Posted September 9, 2013 Here is the script #include <GUIconstants.au3> $fraps = GUICreate("Open",298,152,516,409) $button = GUICtrlCreateButton("open",72,16,153,49) GUISetState(@SW_SHOW) While 1 $nmsg = GUIGetMsg() Switch $nmsg Case $gui_event_close Exit Case $button Run ("C:UsersMyNameDesktoptest.txt") EndSwitch WEnd #RequireAdmin I dont know why this script don't open the text.txt when I press the "open" button If someone could help me will be great Thx in advance Link to comment Share on other sites More sharing options...
Solution Morthawt Posted September 9, 2013 Solution Share Posted September 9, 2013 (edited) Replace Run with ShellExecute Run is for an actual program while with ShellExecute you can open websites, text files etc. Also on a side note, you have set specific coordinates for your GUI to display at. If instead you set the last two parameters to -1 the GUI will always show on the screen in the centre of the screen no matter the resolution. Edited September 9, 2013 by Morthawt Samir90 1 Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. Link to comment Share on other sites More sharing options...
Samir90 Posted September 9, 2013 Author Share Posted September 9, 2013 Thanks alot Link to comment Share on other sites More sharing options...
Morthawt Posted September 9, 2013 Share Posted September 9, 2013 You're very welcome. Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials. 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