Jump to content

Shockwave control


Recommended Posts

Hi. Here's my little issue :

I have a webpage with a shockwave applet. What I wanna do is sending keystrokes to this (there's a chatbar) without activating the window (window minimized).

I've been able to use ControlFocus with what Autoit Info gives me for this control and then ControlSend and it works.. but the IE window is popping up of course.

I'd like to do the same "silently". Is is possible? If so, any idea?

Link to comment
Share on other sites

Hi. Here's my little issue :

I have a webpage with a shockwave applet. What I wanna do is sending keystrokes to this (there's a chatbar) without activating the window (window minimized).

I've been able to use ControlFocus with what Autoit Info gives me for this control and then ControlSend and it works.. but the IE window is popping up of course.

I'd like to do the same "silently". Is is possible? If so, any idea?

ControlSend() itself doesn't cause a window to become active. If the app receiving the input responds by activating the window, I don't know how you would prevent that. The best you could hope for is detecting it with a tight loop that re-minimized it.

Moving the window off the desktop instead of minimizing it might help.

:)

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
Link to comment
Share on other sites

Here is a simple IE example it will create a hidden IE window to google.com then go to yahoo.com then quit. Note that when creating the window it will wait till it has fully loaded then going to yahoo.com will wait too.

#include <IE.au3>

_IEErrorHandlerRegister("MyErrFunc")
$oIE = _IECreate("http://www.google.com/", 0, 0)
_IENavigate($oIE, "http://www.yahoo.com/")
_IEQuit($oIE)
_IEErrorHandlerDeRegister()

Func MyErrFunc()
; Important: the error object variable MUST be named $oIEErrorHandler
    $ErrorScriptline = $oIEErrorHandler.scriptline
    $ErrorNumber = $oIEErrorHandler.number
    $ErrorNumberHex = Hex($oIEErrorHandler.number, 8)
    $ErrorDescription = StringStripWS($oIEErrorHandler.description, 2)
    $ErrorWinDescription = StringStripWS($oIEErrorHandler.WinDescription, 2)
    $ErrorSource = $oIEErrorHandler.Source
    $ErrorHelpFile = $oIEErrorHandler.HelpFile
    $ErrorHelpContext = $oIEErrorHandler.HelpContext
    $ErrorLastDllError = $oIEErrorHandler.LastDllError
    $ErrorOutput = ""
    $ErrorOutput &= "--> COM Error Encountered in " & @ScriptName & @CR
    $ErrorOutput &= "----> $ErrorScriptline = " & $ErrorScriptline & @CR
    $ErrorOutput &= "----> $ErrorNumberHex = " & $ErrorNumberHex & @CR
    $ErrorOutput &= "----> $ErrorNumber = " & $ErrorNumber & @CR
    $ErrorOutput &= "----> $ErrorWinDescription = " & $ErrorWinDescription & @CR
    $ErrorOutput &= "----> $ErrorDescription = " & $ErrorDescription & @CR
    $ErrorOutput &= "----> $ErrorSource = " & $ErrorSource & @CR
    $ErrorOutput &= "----> $ErrorHelpFile = " & $ErrorHelpFile & @CR
    $ErrorOutput &= "----> $ErrorHelpContext = " & $ErrorHelpContext & @CR
    $ErrorOutput &= "----> $ErrorLastDllError = " & $ErrorLastDllError
    FileWrite(@ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & " Errors.txt", $ErrorOutput & @CRLF & @CRLF)
    SetError(1)
    Return
EndFunc  ;==>MyErrFunc

Link to comment
Share on other sites

How do you open IE? I'm not very familiar with the IE UDF or it's shockwave capabilities. But what if you open IE with the @sw_hide flag? Haven't tried that but sounds like an idea to me.

You won :o

Thanks a lot.. that works ! I'm sending the keys to the shockwave application but the window is hidden so it's not filling the screen and can do this in the background.

Thanks others for your ideas :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...