Jump to content

Error help


BALA
 Share

Recommended Posts

I keep getting this error when I run my script:

C:\PROGRA~1\AutoIt3\Include\IE.au3 (290) : ==> Unknown option or bad parameter specified.:

Local $iWinTitleMatchMode = Opt("WinTitleMatchMode")

This is the line where the error is being caused:

$attach = _IEAttach ("Test", "embedded")

I tried adding Opt("WinTitleMatchMode") in the code, but the same error happened again. What am I doing wrong? If more of the code is require, please do say so.

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

:whistle: Sorry, I'm a bit confused. Is it that I didn't put a parameter or is it a bug in the newest version of AutoIt?

EDIT: Nevermind, thanks Shevilie

EDIT: Sorry, spoke too soon again, is this what I need to put in my code:

Local $iWinTitleMatchMode = Opt("WinTitleMatchMode")
Opt("WinTitleMatchMode", 2)
$h_control = ControlGetHandle($s_string, "", "Internet Explorer_Server1")
$oResult = __IEControlGetObjFromHWND($h_control)
Opt("WinTitleMatchMode", $iWinTitleMatchMode)
Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

No thats the code _IEAttach use...

Try to give me more code to debug :whistle:

Oh sure:

#include <GuiConstants.au3>
#include <IE.au3>
#include <String.au3>
#include <array.au3>

GUICreate("BA-FINDER", 640, 580, _
        (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _
        $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$oIE = _IECreateEmbedded ()
$addressbar = GUICtrlCreateInput("", 10, 10, 580)
$go = GUICtrlCreateButton("Go", 595, 10, 20, 20)
$GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360)
$GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30)
$GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30)
$GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30)
$GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30)
$search = GUICtrlCreateButton("Search for Files", 450, 420, 100, 30)

GUISetState()

_IENavigate ($oIE, "http://four.fsphost.com/BALA/main.html")
 ; Error occurs here
$attach = _IEAttach ("BA-FINDER", "embedded")
MsgBox(0, "test", _IEPropertyGet ($attach, "locationurl"))

Func CLOSEClicked()
    Exit
EndFunc

Func Search()
    GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES)
    GUISetBkColor (0x00E0FFFF)
    $listview = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150)
    $button = GUICtrlCreateButton ("Value?",75,170,70,20)
    $item1=GUICtrlCreateListViewItem("item2|col22|col23",$listview)
    $item2=GUICtrlCreateListViewItem("item1|col12|col13",$listview)
    $item3=GUICtrlCreateListViewItem("item3|col32|col33",$listview)
    $input1=GUICtrlCreateInput("",20,200, 150)
    GUICtrlSetState(-1,$GUI_DROPACCEPTED)
    GUISetState()
    $HTML = _IEDocReadHTML($oIE)
    $other = _StringBetween($HTML, "<a href=", ">")
EndFunc

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            CLOSEClicked()
        Case $msg = $go
            _IENavigate($oIE, GUICtrlRead($addressbar))
        Case $msg = $search
            Search()
        Case $msg = $GUI_Button_Home
            _IENavigate ($oIE, "http://four.fsphost.com/BALA/main.html")
        Case $msg = $GUI_Button_Back
            _IEAction ($oIE, "back")
        Case $msg = $GUI_Button_Forward
            _IEAction ($oIE, "forward")
        Case $msg = $GUI_Button_Stop
            _IEAction ($oIE, "stop")
    EndSelect
    Sleep(10)
WEnd
Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

I have version v3.2.2.0

That is the latest version right?

EDIT: Here's what happens when I use the compiled script:

post-18884-1171809311_thumb.gif

Edited by BALA
[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

Have you read the posts I linked too ?

Yes, so it's because of some bug in the newest AutoIt version?

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com
Link to comment
Share on other sites

  • Developers

Yes, so it's because of some bug in the newest AutoIt version?

mmmm ... not sure why you ask when you read the whole thread but: yes correct .... will be fixed in the next Beta

The work around is given in the thread ....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...