Sign in to follow this  
Followers 0
Joseph

noob tools file run button

8 posts in this topic

i'm trying to make the play button on this script run the file that is from the $mp3 input, i have the play button (which is $PlayMp3) as part of a selection in the while list, can someone tell me how to run the information from the input text?

here is the script

#include <guiconstants.au3>
$GUI= GUICreate("Rune Tools", 200, 100, -1, -1, -1)
$ExitId = GUICtrlCreateButton("Exit",0,0,50,20)
$Cliku = GUICtrlCreateButton("Cliku",50,0,50,20)
$ArrowStart = GUICtrlCreateButton("Idler",100,0,50,20)
$RuneHq = GuiCtrlCreateButton("RuneHq" ,150,0,50,20)
$mp3 = GUICtrlCreateInput("C:\mp3", 0,20,100,20)
$PlayMp3 = GuiCtrlCreateButton("Play",100,20,50,20)
GUISetState(@SW_SHOW) 
WinSetOnTop($GUI, "", 1) 

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")

While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        exit
    Case $msg= $ExitId 
        GUIDelete()
        Exit     
    Case $msg= $Cliku
        MsgBox(0,"Cliku!", "yee")
    Case $msg= $ArrowStart   
        AdlibEnable("_Send", 10000)
    Case $msg= $RuneHq
        OpenRqFF()
    Case $msg= $PlayMp3
        Run($mp3)
        
    EndSelect
Wend

Func OpenRqFF()
    Run("C:\Program Files\Mozilla Firefox\firefox.exe")
    Sleep(2000)
    Send("^{l}")
    Send("http://www.runehq.com/")
    Send("{enter}") 
EndFunc 

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc


Func _Send()
    Send("{right}")
EndFunc

Share this post


Link to post
Share on other sites



I'd use the Sound functions instead of trying to run it. If you just want it to open in the default player you could try ShellExecute instead.

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  
Followers 0