jannlee300 Posted March 21, 2009 Share Posted March 21, 2009 i have a script which when it is opened it plays a .avi (can be changed) is there anyway to compile the script and include the video? Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 21, 2009 Share Posted March 21, 2009 (edited) FileInstall ( "source", "dest" [, flag] )oÝ÷ Ù8b³ .Ún¶Ø^jø¢Ø^{¢jbçSéðéëjxÂ¥vZqëayø¥y«mç^²Ø§jبثZ¥u·jÈ®Ú.±ä®*m*ڱ׬¶)Ú¶*'¶Þi¹^¶Xºh®éâ¶Vz°%²hméâq쨹Ƨvayú%"hëkÚÚ~Ø^ç(z¶®¶sdfÆTFVÆWFRgV÷C·FgV÷C² Edited March 21, 2009 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
jannlee300 Posted March 21, 2009 Author Share Posted March 21, 2009 this is my code when i try to compile it i get a error "error opening destination file" $location=@MyDocumentsDir&"\name of file" FileInstall("location of file",$location,1) ShellExecute('Wmplayer.exe', $location, ' ', 'open') WinWaitActive("windows media player") WinWaitClose("windows media player") FileDelete($location) ps. it works fine when i just run the sript thanks Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 21, 2009 Share Posted March 21, 2009 (edited) this is my code when i try to compile it i get a error"error opening destination file"$location=@MyDocumentsDir&"\name of file"FileInstall("location of file",$location,1)ShellExecute('Wmplayer.exe', $location, ' ', 'open')WinWaitActive("windows media player")WinWaitClose("windows media player")FileDelete($location)ps. it works fine when i just run the sript thanksWith FileInstall you have to have full directory i.e.$location=@MyDocumentsDir & "\"FileInstall("C:\Users\Default\Videos\Video.avi", $location, 1)ShellExecute('Wmplayer.exe', $location & "Video.avi"), ' ', 'open')WinWaitActive("windows media player")WinWaitClose("windows media player")FileDelete($location & "Video.avi")FileInstall("Directory on your Computer with file and extention cannot be a variable", "Directory on other persons computer to place it") Edited March 21, 2009 by rogue5099 My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
jannlee300 Posted March 21, 2009 Author Share Posted March 21, 2009 this is what i have and i still get the same error $location=@MyDocumentsDir&"\" FileInstall("C:\Users\default\Desktop\untitled.avi",$location,1) ShellExecute('Wmplayer.exe', $location&"untitled.avi", ' ', 'open') WinWaitActive("Windows Media Player") WinWaitClose("Windows Media Player") FileDelete($location&"untitled.avi") Link to comment Share on other sites More sharing options...
gsglive Posted March 21, 2009 Share Posted March 21, 2009 (edited) this is what i have and i still get the same error $location=@MyDocumentsDir&"\" FileInstall("C:\Users\default\Desktop\untitled.avi",$location,1) ShellExecute('Wmplayer.exe', $location&"untitled.avi", ' ', 'open') WinWaitActive("Windows Media Player") WinWaitClose("Windows Media Player") FileDelete($location&"untitled.avi") $location = @MyDocumentsDir & "\" FileInstall("C:\Users\default\Desktop\untitled.avi", $location & "untitled.avi",1) ShellExecute('Wmplayer.exe', $location & "untitled.avi", ' ', 'open') WinWaitActive("Windows Media Player") WinWaitClose("Windows Media Player") FileDelete($location & "untitled.avi") the destination of FileInstall needs to include extensions too. - gsglive Edited March 21, 2009 by gsglive - gsglive Link to comment Share on other sites More sharing options...
jannlee300 Posted March 21, 2009 Author Share Posted March 21, 2009 im still getting the error would it have something to do with vista? Link to comment Share on other sites More sharing options...
gsglive Posted March 21, 2009 Share Posted March 21, 2009 im still getting the errorwould it have something to do with vista?try these four things, one at a time:1) does the files actually exist in its original directory? if not, there's your problem2) comment out every thing after the fileinstall. Then, go look in my documents3) replace fileinstall with filecopy & try.4) replace fileinstall with filecopy, comment out everything after filecopy, then go check for the file's existence. - gsglive - gsglive Link to comment Share on other sites More sharing options...
jannlee300 Posted March 21, 2009 Author Share Posted March 21, 2009 try these four things, one at a time:1) does the files actually exist in its original directory? if not, there's your problem2) comment out every thing after the fileinstall. Then, go look in my documents3) replace fileinstall with filecopy & try.4) replace fileinstall with filecopy, comment out everything after filecopy, then go check for the file's existence. - gsglivei tryed all fo them and im still getting the same thingthe file is in the origonal dirthe file does copy with bothi just cant compile it to an exe Link to comment Share on other sites More sharing options...
gsglive Posted March 21, 2009 Share Posted March 21, 2009 i tryed all fo them and im still getting the same thingthe file is in the origonal dirthe file does copy with bothi just cant compile it to an exemy guess is that you are ShellExecuting incorrectly. Try reviewing the paramenters for it. - gsglive - gsglive Link to comment Share on other sites More sharing options...
jannlee300 Posted March 21, 2009 Author Share Posted March 21, 2009 my guess is that you are ShellExecuting incorrectly. Try reviewing the paramenters for it. - gsgliveeven after i commented that out i got the same error Link to comment Share on other sites More sharing options...
Rogue5099 Posted March 21, 2009 Share Posted March 21, 2009 I use this in one of my scripts: FileInstall(".\Includes\Process.exe", $rvdir & "\") "." goes from script dir to make it easily compileable cause several people compile to help on going process. So with yours this should work as long as you have the file in this directory: (C:\Users\default\Desktop\untitled.avi) $location = @MyDocumentsDir & "\" FileInstall("C:\Users\default\Desktop\untitled.avi", $location, 1) ShellExecute('Wmplayer.exe', $location & "untitled.avi", ' ', 'open') WinWaitActive("Windows Media Player") WinWaitClose("Windows Media Player") FileDelete($location & "untitled.avi") My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
jannlee300 Posted March 24, 2009 Author Share Posted March 24, 2009 I use this in one of my scripts: FileInstall(".\Includes\Process.exe", $rvdir & "\") "." goes from script dir to make it easily compileable cause several people compile to help on going process. So with yours this should work as long as you have the file in this directory: (C:\Users\default\Desktop\untitled.avi) $location = @MyDocumentsDir & "\" FileInstall("C:\Users\default\Desktop\untitled.avi", $location, 1) ShellExecute('Wmplayer.exe', $location & "untitled.avi", ' ', 'open') WinWaitActive("Windows Media Player") WinWaitClose("Windows Media Player") FileDelete($location & "untitled.avi") i figured it out the folder was set to read only i dont know how this happend but anyways it works thanks for all ur help 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