DeeRiee Posted June 16, 2009 Share Posted June 16, 2009 Well, im trying to make an object. It's a ShockwaveFlash.ShockwaveFlash. I tried to resize it using GUICtrlSetPos. But always return an error. Here's my script #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("flash", 379, 244, 216, 151) $swfObj = ObjCreate("ShockwaveFlash.ShockwaveFlash") $swfActiveX = GUICtrlCreateObj($swfObj, 100, 10, 190, 100) $Button1 = GUICtrlCreateButton("Resize", 104, 176, 177, 41, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $Button1 $resize = GUICtrlSetPos($swfObj, 0, 0, 230, 200); why this doesnt work on shockwaveflash object? If $resize = 0 Then MsgBox(0,"error","failed to resize") Else MsgBox(0,"success","resizing successfull") EndIf Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Thanks before.. Link to comment Share on other sites More sharing options...
DeeRiee Posted June 17, 2009 Author Share Posted June 17, 2009 Anyone can help me? Link to comment Share on other sites More sharing options...
toxicvn Posted June 17, 2009 Share Posted June 17, 2009 this is a example: $GUI = GUICreate("Age of War [AutoIt Var Editing]", 670, 560, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450) With $oGame .bgcolor = "#000000" .Movie = "http://207.218.234.34/ageofwarupdate1MzYx.swf" .Loop = True .ScaleMode = 2 .wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("Money", 10, 470, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 468, 100) $TechLevel = GUICtrlCreateInput("Tech Level (1 - 5)", 10, 500, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 498, 100) $XP = GUICtrlCreateInput("XP", 10, 530, 100, 20) $SetXP = GUICtrlCreateButton("Set XP", 120, 528, 100) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit Case $nMsg = $SetMoney $Read_Money = GUICtrlRead($Money) $oGame.SetVariable("cash", $Read_Money) Case $nMsg = $SetTechLevel $Read_TechLevel = GUICtrlRead($TechLevel) $oGame.SetVariable("tech_level", $Read_TechLevel) Case $nMsg = $SetXP $Read_XP = GUICtrlRead($XP) $oGame.SetVariable("xp", $Read_XP) EndSelect WEnd Link to comment Share on other sites More sharing options...
toxicvn Posted June 17, 2009 Share Posted June 17, 2009 this is a example: $GUI = GUICreate("Age of War [AutoIt Var Editing]", 670, 560, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450) With $oGame .bgcolor = "#000000" .Movie = "http://207.218.234.34/ageofwarupdate1MzYx.swf" .Loop = True .ScaleMode = 2 .wmode = "Opaque" EndWith $Money = GUICtrlCreateInput("Money", 10, 470, 100, 20) $SetMoney = GUICtrlCreateButton("Set Money", 120, 468, 100) $TechLevel = GUICtrlCreateInput("Tech Level (1 - 5)", 10, 500, 100, 20) $SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 498, 100) $XP = GUICtrlCreateInput("XP", 10, 530, 100, 20) $SetXP = GUICtrlCreateButton("Set XP", 120, 528, 100) GUISetState() While 1 $nMsg = GUIGetMsg() Select Case $nMsg = -3 Exit Case $nMsg = $SetMoney $Read_Money = GUICtrlRead($Money) $oGame.SetVariable("cash", $Read_Money) Case $nMsg = $SetTechLevel $Read_TechLevel = GUICtrlRead($TechLevel) $oGame.SetVariable("tech_level", $Read_TechLevel) Case $nMsg = $SetXP $Read_XP = GUICtrlRead($XP) $oGame.SetVariable("xp", $Read_XP) EndSelect WEnd Link to comment Share on other sites More sharing options...
DeeRiee Posted June 18, 2009 Author Share Posted June 18, 2009 I want to set the object size not the variable... Link to comment Share on other sites More sharing options...
DeeRiee Posted June 18, 2009 Author Share Posted June 18, 2009 Well, solved by myself... Link to comment Share on other sites More sharing options...
ulmstefan Posted May 20, 2010 Share Posted May 20, 2010 Well, solved by myself...I've the same problem, how did you solve it? 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