Sign in to follow this  
Followers 0
failedtocompile

Shockwaveflash error "with"

6 posts in this topic

#1 ·  Posted (edited)

Hello people

the weirdest thing has happened with one of my scripts. Iv come back after about 4 wks to check on this small side project i was creating and of which was all working i even sent out a few beta compiled executables which worked.

I attempt to execute the script and it would not launch it generates an error in Autoit:

tutorial assistant.au3 (49) : ==> Only Object-type variables allowed in a "With" statement.:
With $oFlash
With ^ ERROR
>Exit code: 1    Time: 0.989

Below is some of the code if i comment it out, the rest of the script works just lose my customized splash screen :D

I spent about 13hrs creating the .swf and figuring out how to make a custom launch splash, I'm still learning with Autoit. not sure if someone has messed with my scripts :D

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

; Hides the system tray icon
TraySetState(2)

;installs the background GUI image to local users %temp% folder
FileInstall("spiderweb523.jpg", @TempDir & "\test123.png", 1)
FileInstall("it tut.swf", @TempDir & "\it tut.swf", 1)

;External SWF File Name (assumed in same folder)
$swffile = @TempDir & "\it tut.swf" ;intro swf file

;Create the Shockwave Flash Object - this can contain Flex as well as Flash SWF Files
$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
sleep(20)

;Create the AutoIT GUI Window
$hModWnd = GUICreate("", 620, 410, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_POPUP)

;Create the ActiveX Container
$GUIActiveX = GUICtrlCreateObj($oFlash, 0, 0, 620, 410)
GUISetState()


;Set up COM error handling
$oMyError = ObjEvent("AutoIt.Error","COMErrFunc")

;Below code is where it errors out
;Initialize the Flex ActiveX
With $oFlash; Object tag pool
    .Movie = FileGetShortName($swffile) ;@scriptdir & '\' &
    .ScaleMode = 2; 0 showall, 1 noborder, 2 exactFit, 3 noscale
    .bgcolor = "#000000"
    .Loop = False
    .wmode = "transparent"; Opaque / transparent
    .allowScriptAccess = "Always"
EndWith


sleep(17000) ;sleep for 17sec which runs 17s of the flash file

GUIDelete() ; deletes gui i.e. flash object

Currently running:

SciTE4AutoIt3

Version 1.77

Dec 24 2008 09:01:19

Iv uninstalled completely and reinstalled just encase the required Include was broken.

created a new script and just added what is posted in this post, still same error :D

I'm thinking some noobish over sight on my behalf

any help would be great.

ftc

Edited by failedtocompile

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello people

the weirdest thing has happened with one of my scripts. Iv come back after about 4 wks to check on this small side project i was creating and of which was all working i even sent out a few beta compiled executables which worked.

I attempt to execute the script and it would not launch it generates an error in Autoit:

tutorial assistant.au3 (49) : ==> Only Object-type variables allowed in a "With" statement.:
With $oFlash
With ^ ERROR
>Exit code: 1    Time: 0.989

Below is some of the code if i comment it out, the rest of the script works just lose my customized splash screen :D

I spent about 13hrs creating the .swf and figuring out how to make a custom launch splash, I'm still learning with Autoit. not sure if someone has messed with my scripts :D

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

; Hides the system tray icon
TraySetState(2)

;installs the background GUI image to local users %temp% folder
FileInstall("spiderweb523.jpg", @TempDir & "\test123.png", 1)
FileInstall("it tut.swf", @TempDir & "\it tut.swf", 1)

;External SWF File Name (assumed in same folder)
$swffile = @TempDir & "\it tut.swf" ;intro swf file

;Create the Shockwave Flash Object - this can contain Flex as well as Flash SWF Files
$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
sleep(20)

;Create the AutoIT GUI Window
$hModWnd = GUICreate("", 620, 410, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_POPUP)

;Create the ActiveX Container
$GUIActiveX = GUICtrlCreateObj($oFlash, 0, 0, 620, 410)
GUISetState()


;Set up COM error handling
$oMyError = ObjEvent("AutoIt.Error","COMErrFunc")

;Below code is where it errors out
;Initialize the Flex ActiveX
With $oFlash; Object tag pool
    .Movie = FileGetShortName($swffile) ;@scriptdir & '\' &
    .ScaleMode = 2; 0 showall, 1 noborder, 2 exactFit, 3 noscale
    .bgcolor = "#000000"
    .Loop = False
    .wmode = "transparent"; Opaque / transparent
    .allowScriptAccess = "Always"
EndWith


sleep(17000) ;sleep for 17sec which runs 17s of the flash file

GUIDelete() ; deletes gui i.e. flash object

Currently running:

SciTE4AutoIt3

Version 1.77

Dec 24 2008 09:01:19

Iv uninstalled completely and reinstalled just encase the required Include was broken.

created a new script and just added what is posted in this post, still same error :D

I'm thinking some noobish over sight on my behalf

any help would be great.

ftc

Has your flash player been updated since it worked? There have been numerous splashy reports about new security updates for flash player.

:D

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Has your flash player been updated since it worked? There have been numerous splashy reports about new security updates for flash player.

:D

Thanks PsaltyDS for that intel, ill go check it out over at adobe forums and a few other forums. its 06:44 at the moment so hopefully i can come up with a resolve :D

Share this post


Link to post
Share on other sites

Hello people

the weirdest thing has happened with one of my scripts. Iv come back after about 4 wks to check on this small side project i was creating and of which was all working i even sent out a few beta compiled executables which worked.

I attempt to execute the script and it would not launch it generates an error in Autoit:

tutorial assistant.au3 (49) : ==> Only Object-type variables allowed in a "With" statement.:
With $oFlash
With ^ ERROR
>Exit code: 1    Time: 0.989

Below is some of the code if i comment it out, the rest of the script works just lose my customized splash screen :D

I spent about 13hrs creating the .swf and figuring out how to make a custom launch splash, I'm still learning with Autoit. not sure if someone has messed with my scripts :D

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

; Hides the system tray icon
TraySetState(2)

;installs the background GUI image to local users %temp% folder
FileInstall("spiderweb523.jpg", @TempDir & "\test123.png", 1)
FileInstall("it tut.swf", @TempDir & "\it tut.swf", 1)

;External SWF File Name (assumed in same folder)
$swffile = @TempDir & "\it tut.swf" ;intro swf file

;Create the Shockwave Flash Object - this can contain Flex as well as Flash SWF Files
$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
sleep(20)

;Create the AutoIT GUI Window
$hModWnd = GUICreate("", 620, 410, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_POPUP)

;Create the ActiveX Container
$GUIActiveX = GUICtrlCreateObj($oFlash, 0, 0, 620, 410)
GUISetState()


;Set up COM error handling
$oMyError = ObjEvent("AutoIt.Error","COMErrFunc")

;Below code is where it errors out
;Initialize the Flex ActiveX
With $oFlash; Object tag pool
    .Movie = FileGetShortName($swffile) ;@scriptdir & '\' &
    .ScaleMode = 2; 0 showall, 1 noborder, 2 exactFit, 3 noscale
    .bgcolor = "#000000"
    .Loop = False
    .wmode = "transparent"; Opaque / transparent
    .allowScriptAccess = "Always"
EndWith


sleep(17000) ;sleep for 17sec which runs 17s of the flash file

GUIDelete() ; deletes gui i.e. flash object

Currently running:

SciTE4AutoIt3

Version 1.77

Dec 24 2008 09:01:19

Iv uninstalled completely and reinstalled just encase the required Include was broken.

created a new script and just added what is posted in this post, still same error :D

I'm thinking some noobish over sight on my behalf

any help would be great.

ftc

hello failedtocompile,

no need to feel like a noob, youve just left a semi-colon at the end of the object reference.

you mention you've been working with flash, im not surprised you've put it there, gets confusing switching between two languages.

With $oFlash <- this line

methodclass

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

hello failedtocompile,

no need to feel like a noob, youve just left a semi-colon at the end of the object reference.

you mention you've been working with flash, im not surprised you've put it there, gets confusing switching between two languages.

With $oFlash <- this line

methodclass

That's not a problem. The semicolon in AutoIt begins an in-line comment. For example, this is valid:
Global $avArray[3] = ["Alpha", _ ; This is the first index [0]
        "Beta", _ ; Second index [1]
        "Gamma"] ; Last index [2]

:D

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

No help over at the Adobe forums. nothing i could reference with anyway

Even after 2 re installs of Adobe 10 it didn't work, but today i noticed the local install was missing C:\WINDOWS\system32\Macromed\Flash\*

so re installed from another flash10ax.msi.

think maybe the msi didn't work correctly. i double checked script operation now all working. so was a bit of a noobish over sight by myself :D

Edited by failedtocompile

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