Jump to content

Recommended Posts

  • Moderators
Posted

Hi @ all,

i have a little question. Does anyone know how i can use this "onclick" action?

<input type="image" onclick="this.form.wui_event_id.value='onclick';this.form.wui_target_id.value='sendButton';this.form.submit();return false;" src="https://www.orange.ch/static/portal/images/send.de.gif" alt="senden" name="sendButton"/>

I tried with _IEFormSubmit($o_form) but won't work :-S

Thanks a lot,

Regads

CoDeX2k

It is an image so try this:

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "Your webpage")
_IEClickImg($oIE, "https://www.orange.ch/static/portal/images/send.de.gif")
Posted

Hey DaleHohm! I read something that you wrote in other post...

You gave me an idea, then added some few lines it his, and I obtained this:

Func _IEContextMenuDisabled ($o_object,$n_disabled=1)
    Local $s_htmlFor="document", $s_event="oncontextmenu"
    Select
        Case $n_disabled=0
            $s_script="return true;"
        Case $n_disabled=1
            $s_script="return false;"
        Case Else
            SetError (1)
            Return
    EndSelect
    
    If IsObj($o_object) Then
        SetError(0)
        Local $o_head = $o_object.document.all.tags("HEAD").Item(0)
        Local $o_script = $o_object.document.createElement("script")
        With $o_script
            .defer = True
            .language="jscript"
            .type = "text/javascript"
            .htmlFor = $s_htmlFor
            .event = $s_event
            .text = $s_script
        EndWith
        $o_head.appendChild($o_script)
        Return 1
    Else
        SetError(1)
        Return 0
    EndIf
EndFunc

What you think?

Posted

@big_daddy: it diden't work out :-S But tried it with that code from the 11. Sample form AutoIt 1-2-3 and it workt =)

But some times i get an error don't know why... anybody an idea what i can do?

Thanks a lot,

Regards,

CoDeX2k

Posted (edited)

go by the index count all the forms and see which one it is its based on 0 so

0 = 1st form

_IEFormGetObjByIndex()

then if there are any liek inputs or anything in it that dont have names u can use

_IEFormElementGetObjByIndex()

Edited by thatsgreat2345
Posted

There wouldn't happen to be an _IEFrameGetObjByClick() function. A function that returns a IEobj on a mouse click event.

There is not. It would be possible to do this -- how would you use it?

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

hes saying like i mean you would define that and then the next thing you clicked Example a button and that stuff it would magicaly find what ever the crap it was in the script and then it would return whatever obj u clicked

Posted

should look like this

#include <ie.au3>

$ie = _IEcreate(1)
_IEnavigate($ie,"http://pandorabots.com/botmaster/en/home")
_IEloadwait($ie)
$form = _IEFormGetObjByindex($ie,0)
$username = _IEFormElementGetObjByname($form,"acct")
_IEFormElementSetValue($username,"YOURUSERNAME")
$password = _IEFormElementGetObjByname($form,"password")
_IEFormElementSetValue($password,"YOURPASSWORD")
_IEFormsubmit($form)
Posted

u count how many forms there are and they are representd by

<form>

and ends with

</form>

thats going to be 1 form so with a 0 index

0 = 1

1 = 2

so look for the first

<form>

</form

and thats 0

then any more after that are going to be 1 more

Posted

I saw in the IE.au3 library a function called _IEPropertyGet,

is possible to know how to change browser property, a function that could be called _IEPropertySet

if it exist yet please tell me where i can find it !!

Thank you people

Posted

I saw in the IE.au3 library a function called _IEPropertyGet,

is possible to know how to change browser property, a function that could be called _IEPropertySet

if it exist yet please tell me where i can find it !!

Thank you people

Yes, it is written and will be released shortly.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

Thank you, where i will found the new relase? in this topic or where?

I will post it to the forum. I will likely start a new thread, but I will post an update here.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted (edited)

There is not. It would be possible to do this -- how would you use it?

Dale

At the time I posted; I was wanting to get the object name of a dropdown menu @http://www.battleon.com/ so I could set it's state.

I also think it may also be easier to get object names returned to a msgbox after clicking instead of searching though a html document.

Edited by quick_sliver007

.

Posted

At the time I posted; I was wanting to get the object name of a dropdown menu @http://www.battleon.com/ so I could set it's state.

I also think it may also be easier to get object names returned to a msgbox after clicking instead of searching though a html document.

I highly recommend a few other options over digging through the source code or implementing this as custom functionality... 1) open the page with FireFox and use the DOM Inspector that is part of FireFox - very powerful 2) search for a scriptlet called MODIv2 in Google... it gives you a link that looks like a bookmark, but when clicked gives you a mouse-over DOM inspector in IE.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

I highly recommend a few other options over digging through the source code or implementing this as custom functionality... 1) open the page with FireFox and use the DOM Inspector that is part of FireFox - very powerful 2) search for a scriptlet called MODIv2 in Google... it gives you a link that looks like a bookmark, but when clicked gives you a mouse-over DOM inspector in IE.

Dale

Thank you.

.

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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