Jump to content
Sign in to follow this  

I need help with a button.....

Recommended Posts

Here is the script
#include <GUIconstants.au3>
$fraps = GUICreate("Open",298,152,516,409)
$button = GUICtrlCreateButton("open",72,16,153,49)
While 1
$nmsg = GUIGetMsg()
Switch $nmsg
Case $gui_event_close
Case $button
Run ("C:UsersMyNameDesktoptest.txt")
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

Share this post

Link to post
Share on other sites

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 by Morthawt
  • Like 1

Share this post

Link to post
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
Sign in to follow this