Lakes Posted March 27, 2006 Posted March 27, 2006 expandcollapse popup#include <GUIConstants.au3> ; == GUI generated with Koda ==); $TrackName = GUICreate("Track Name", 425, 54, 193, 161) $Currtrack = GUICtrlCreateLabel("Current Track", 8, 16, 290, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Play = GUICtrlCreateButton("PLAY", 320, 8, 97, 33, 0) GUISetState(@SW_SHOW) ;FileOpenDialog ( "title", "init dir", "filter" $Filename = FileOpenDialog ( $TrackName, "","All(*.*)",0) GUICtrlSetData ( $Currtrack, "TrackName: " &$Filename) Run ('C:\Program Files\Windows Media Player\wmplayer.exe $FileName') ;Run ('C:\Program Files\Windows Media Player\wmplayer.exe "F:\MP3\06 - Deeper Well.mp3"') GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $Play Send("{MEDIA_PLAY_PAUSE}") ; EndSelect Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit I can`t work out how to do such a simple thing.... Thanks! 2015 - Still no flying cars, instead blankets with sleeves.
Moderators SmOke_N Posted March 27, 2006 Moderators Posted March 27, 2006 Did you try: Run('C:\Program Files\Windows Media Player\wmplayer.exe ' & '"' & $FileName & '"')? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
nfwu Posted March 27, 2006 Posted March 27, 2006 Run ('C:\Program Files\Windows Media Player\wmplayer.exe $FileName') ^^ that looks like syntax from v2 (if i'm not wrong)... the Variable name i mean, In the run statement highlighted above, you are not passing the value of $Filename to wmplayer. You are passing "$FileName" to the application. SmOke_N's code would work... #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode()
Lakes Posted March 27, 2006 Author Posted March 27, 2006 Yep, it works!, thanks Guys! I had tried the double quotes thing, I see, you have to put the filename quotes in quotes.. 2015 - Still no flying cars, instead blankets with sleeves.
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