amdead Posted March 12, 2006 Share Posted March 12, 2006 Hello, am a n00b at autoit, i would like help to put a SWF into a GUI window. Can somebody help? Link to comment Share on other sites More sharing options...
BigDod Posted March 12, 2006 Share Posted March 12, 2006 Hello, am a n00b at autoit, i would like help to put a SWF into a GUI window. Can somebody help?Here is one I found by searching the forums #include <GUIConstants.au3> $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("PacMan", 820, 600, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP; Object tag pool .bgcolor = "#000000"; change background color to white FFFFFF .Movie = 'http://www.80smusiclyrics.com/games/pacman/pacman.swf'; the wave file from inet / could be on disk .ScaleMode = 2 .Loop = True .wmode = "Opaque"; Opaque / transparent ;.Stop / .Play EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $oRP = 0; FREE THE OBJECT GUIDelete () Exit Not written by me. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
amdead Posted March 13, 2006 Author Share Posted March 13, 2006 Thank you. Link to comment Share on other sites More sharing options...
amdead Posted March 13, 2006 Author Share Posted March 13, 2006 It says i have an error on line 2 $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $pRP = ERROR Link to comment Share on other sites More sharing options...
Helge Posted March 13, 2006 Share Posted March 13, 2006 Update your version of AutoIt.It says i have an error on line 2$oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")$pRP = ERROR Link to comment Share on other sites More sharing options...
amdead Posted March 13, 2006 Author Share Posted March 13, 2006 Thank you, it works Link to comment Share on other sites More sharing options...
Champak Posted May 13, 2006 Share Posted May 13, 2006 (edited) I'm running this through beta run and am getting an error: Line 6 With $oRP Error: Illegal text at the end of statement (one statement per line) Only Object-type variables allowed in a WITH statement! Any help. Edit: I dropped the $oRP to the next line after the "With" and now AutoIt3.exe has encountered a problem and needs to close. Now what? Edited May 13, 2006 by Champak Link to comment Share on other sites More sharing options...
BigDod Posted May 13, 2006 Share Posted May 13, 2006 I have just tried running it with the latest Beta and get no errors. Please check that you have copied and pasted correctly. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Champak Posted May 13, 2006 Share Posted May 13, 2006 Did it again and it is copied exactly. Could it be because I have both beta and release on the computers. They are in two different dir.. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 13, 2006 Moderators Share Posted May 13, 2006 Did it again and it is copied exactly. Could it be because I have both beta and release on the computers. They are in two different dir..You have to make sure your running in Beta, In SciTe use Alt+F5 rather than just F5 or Tools / Beta Run. This is a most common mistake. 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. Link to comment Share on other sites More sharing options...
Champak Posted May 13, 2006 Share Posted May 13, 2006 (edited) That's what I did. Now I'm looking in the error at the bottom of the scite thing and this is what it says: C:\Documents and Settings\Money\Desktop\Gui test\pacman.au3 (2) : ==> Unknown function name.: $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oRP = ^ ERROR ->AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 0.721 This is after I moved the oRP back, as it is in the original. #include <GUIConstants.au3> $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("PacMan", 820, 600, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP; Object tag pool .bgcolor = "#000000"; change background color to white FFFFFF .Movie = 'http://www.80smusiclyrics.com/games/pacman/pacman.swf'; the wave file from inet / could be on disk .ScaleMode = 2 .Loop = True .wmode = "Opaque"; Opaque / transparent ;.Stop / .Play EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $oRP = 0; FREE THE OBJECT GUIDelete () Exit Edited May 13, 2006 by Champak Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 13, 2006 Moderators Share Posted May 13, 2006 (edited) That's what I did. Now I'm looking in the error at the bottom of the scite thing and this is what it says: C:\Documents and Settings\Money\Desktop\Gui test\pacman.au3 (2) : ==> Unknown function name.: $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oRP = ^ ERROR ->AutoIT3.exe ended.rc:1 >Exit code: 1 Time: 0.721 This is after I moved the oRP back, as it is in the original. #include <GUIConstants.au3> $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("PacMan", 820, 600, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP; Object tag pool .bgcolor = "#000000"; change background color to white FFFFFF .Movie = 'http://www.80smusiclyrics.com/games/pacman/pacman.swf'; the wave file from inet / could be on disk .ScaleMode = 2 .Loop = True .wmode = "Opaque"; Opaque / transparent ;.Stop / .Play EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $oRP = 0; FREE THE OBJECT GUIDelete () ExitWell I ran it for the first time using Beta 3.1.118 and 3.1.123 and it ran just fine just like this:#include <GUIConstants.au3> $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("PacMan", 820, 600, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP; Object tag pool .bgcolor = "#000000"; change background color to white FFFFFF .Movie = 'http://www.80smusiclyrics.com/games/pacman/pacman.swf'; the wave file from inet / could be on disk .ScaleMode = 2 .Loop = True .wmode = "Opaque"; Opaque / transparent ;.Stop / .Play EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $oRP = 0; FREE THE OBJECT GUIDelete () Exit Edit: You know, as many problems as you are having with Beta, I would suggest uninstalling AutoIt and doing a fresh install of both. Edited May 13, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
Champak Posted May 13, 2006 Share Posted May 13, 2006 (edited) I'll do that Edit: I unitstalled, wiped the registry, reinstalled, same problem. I guess I'll just forget about this part of what I want to do. Edited May 13, 2006 by Champak Link to comment Share on other sites More sharing options...
possy_99 Posted June 23, 2006 Share Posted June 23, 2006 (edited) this is a strange problem, someone has informed me they are experiencing this error, the thing is, they are using a compiled exe which works fine on my and other PC's... any solutions been found yet? Edited June 23, 2006 by possy_99 Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 26, 2006 Share Posted June 26, 2006 This is just a guess but it could have something to do with the version of Flashplayer installed on the computer? I would make sure you have the latest version installed. Mike Link to comment Share on other sites More sharing options...
lopolop Posted June 26, 2006 Share Posted June 26, 2006 yah that's what iwas thinking, update flashplayer 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