Jump to content
Sign in to follow this  
Valnurat

Dropdown selectmenu

Recommended Posts

Hi

I'm trying to select the content in a dropdown menu in the internet explorer, see attachment, but it is teasing me.

I know I have to pick "enGB"

I can only see this:

<TR>
<TD class="width-40 tableLayoutLabel">Data presentation locale:</TD>
<TD class="width-60 tableLayout2"><SPAN id=modalCreateForm:presentationLocale-outer class="framed inline input required input-t-combobox" tabIndex=0 jQuery15105108932362495449="60" data-max-rows="7"><SPAN class=input-icon-required></SPAN><INPUT id=modalCreateForm:presentationLocale name=modalCreateForm:presentationLocale type=hidden jQuery15105108932362495449="61"><SPAN class="value-showcase-wrapper "><SPAN class=value-showcase>&lt;select&gt;</SPAN></SPAN></SPAN></TD></TR>
<TR>

post-62705-0-80643000-1370255115_thumb.j

Edited by Valnurat

Share this post


Link to post
Share on other sites

Do you get any error messages in the SciTE output pane?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes, I have tried this:

$oSelect = _IEFormElementGetObjByName($oFormNext3,"modalCreateForm:presentationLocale")
MsgBox(1,1,@error)
$n = _IEFormElementOptionSelect($oSelect, "enGB", 1, "byValue", 1)
MsgBox(1,1,$n)

1st msgbox is 7

2nd msgbox is 0

And the SciTE output pane is

--> IE.au3 V2.4-0 Warning from function _IEFormElementGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementOptionSelect, $_IEStatus_InvalidDataType

If I use the F12=codewindows and press the arrow and point to the "ComboBox" I don't see anything. It do not have any ID or Name or anything.

Don't know if the HTML source can be used, but here it is.

<TD class="width-60 tableLayout2"><SPAN id=modalCreateForm:presentationLocale-outer class="framed inline input required input-t-combobox" tabIndex=0 jQuery15105108932362495449="60" data-max-rows="7"><SPAN class=input-icon-required></SPAN><INPUT id=modalCreateForm:presentationLocale name=modalCreateForm:presentationLocale type=hidden jQuery15105108932362495449="61"><SPAN class="value-showcase-wrapper "><SPAN class=value-showcase>&lt;select&gt;</SPAN></SPAN></SPAN></TD></TR>

Share this post


Link to post
Share on other sites
Try:
 
$oForm = _IEFormGetCollection($oIE, 0) 
  OR try this one
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
msgbox(-1,"", isobject($oform))
 
 $element = _IEFormElementGetObjByName($oForm, "modalCreateForm:presentationLocale")
msgbox(-1,"", isobject($element))
 
_IEFormElementOptionSelect($element, "enGB", 1, "byText")

Share this post


Link to post
Share on other sites

Hi,

Maybe the problems come from the non-alphabetic characters. I don't know if they need to be escaped.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

No matter, if I use

$oForm = _IEFormGetCollection($oIE, 0)
OR 
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
the 1st msgbox says 1
 
2nd msgbox says 0

 

--> IE.au3 V2.4-0 Warning from function _IEFormElementGetObjByName, $_IEStatus_NoMatch
--> IE.au3 V2.4-0 Error from function _IEFormElementOptionSelect, $_IEStatus_InvalidDataType

 

 

Try:
 
$oForm = _IEFormGetCollection($oIE, 0) 
  OR try this one
$oForm = _IEFormGetObjByName($oIE, "autoDetectWidthForm")
 
msgbox(-1,"", isobject($oform))
 
 $element = _IEFormElementGetObjByName($oForm, "modalCreateForm:presentationLocale")
msgbox(-1,"", isobject($element))
 
_IEFormElementOptionSelect($element, "enGB", 1, "byText")

 

 

Share this post


Link to post
Share on other sites

Can you upload the html and then describe which part you want to gather/Access via Autoit.

This way it should be easy to help.


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#include <IE.au3>
Local $oIE = _IECreate("http://www.syncron.com/")
Local $oInputs = _IETagNameGetCollection($oIE, "span")
Local $sText = ""
For $oInput In $oInputs
 ConsoleWrite($oInput.class & @LF)
 If $oInput.class = "value-showcase" Then
  $sText = $oInput.innerText    ;check the properties in the help files
 EndIf
Next
If $sText <> False Then
 ConsoleWrite("Text: " & $sText & @LF)
 ;do some dirty things with that text!
EndIf
_IEQuit($oIE)

Could help. Check the help files for more informations.

Share this post


Link to post
Share on other sites

#include <IE.au3>
Local $oIE = _IECreate("http://www.syncron.com/")
Local $oInputs = _IETagNameGetCollection($oIE, "span")
Local $sText = ""
For $oInput In $oInputs
 ConsoleWrite($oInput.class & @LF)
 If $oInput.class = "value-showcase" Then
  $sText = $oInput.innerText    ;check the properties in the help files
 EndIf
Next
If $sText <> False Then
 ConsoleWrite("Text: " & $sText & @LF)
 ;do some dirty things with that text!
EndIf
_IEQuit($oIE)
Could help. Check the help files for more informations.

 

Hi

 

Thank you.

 

I have tried to merge this into my existing script.

 

This: ConsoleWrite($oInput.class & @LF) dose not give any result in console windows. It is just blank.

 

You asked me to find the properties for this: $sText = $oInput.innerText    ;check the properties in the help files, but I don't know how to look for $oInput in the helpfile. :ermm: I tried to place the cursor right after the "dot" and pressed CTRL+SPACE and alot of command pops up, but not innertext. :>

I have attach all my code so far.

 

MyCode.au3

Share this post


Link to post
Share on other sites

Ok. I tried this:

 

Local $oElements = _IETagNameAllGetCollection($oIE)
For $oElement In $oElements
 If $oElement.id Then ConsoleWrite("Text: " & "Tagname: " & $oElement.tagname & @CRLF & "id: " & $oElement.id & @CRLF & "innerText: " & $oElement.innerText& @CRLF & @CRLF)
Next

And the result have mulitible content:

Text: Tagname: DIV
id: modalCreateForm:j_idt275
innerText: User interface
International settings
Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Text: Tagname: DIV
id: modalCreateForm:j_idt278
innerText: International settings
Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Text: Tagname: TABLE
id: modalCreateForm:UniqueId_j_id714
innerText: Data presentation locale:<select>
Time zone:None
Language:Auto-detect

Not sure how I should continue with this info.

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  

×
×
  • Create New...