-
Posts
68 -
Joined
-
Last visited
DelStone's Achievements

Wayfarer (2/7)
1
Reputation
-
I often have a need to do this so wrote this general function that allows using a variety of alternative elements you can grab - it is quite straightforward but let me know if you need any explanation - no doubt it can be tidied up - but it does the job for me: ; Return $element on specified form of type "class/name/id/value..." etc with a given text label eg "submit" or "OK", which occurrance number (if the text value can appear more than once in the html code) and a html tag like "input/div/a..." etc Func GetFormElement($form_name, $type, $label, $count = 1, $tag = "", $oIE) Local $form, $element, $elements, $i = 1 If $form_name <> "" Then $form = _IEFormGetObjByName($oIE, $form_name) If $form_name = "" Or @error Then If $tag = "" Then $elements = _IETagNameAllGetCollection($oIE) Else $elements = _IETagNameGetCollection($oIE, $tag) EndIf Else $elements = _IEFormElementGetCollection($form) EndIf For $element In $elements Switch $type Case "class" If _IEPropertyGet($element, "class") And StringInStr($element.class, $label) Then If $i = $count Then Return $element $i += 1 EndIf Case "id" If _IEPropertyGet($element, "id") And StringInStr($element.id, $label) Then If $i = $count Then Return $element $i += 1 EndIf Case "name" If _IEPropertyGet($element, "name") And $element.name = $label Then If $i = $count Then Return $element $i += 1 EndIf Case "value", "title" If StringInStr($element.outerhtml, $label, 1) And StringInStr($element.outerhtml, $type) Then If $i = $count Then If Not $LIVE Then ConsoleWrite("GETFORMELEMENT : 1 " & $element.outerhtml & @CRLF) Return $element EndIf $i += 1 EndIf Case "misc" If StringInStr($element.outerhtml, $label) Then If $i = $count Then Return $element $i += 1 EndIf EndSwitch Next Return 0 EndFunc ;==>GetFormElement
-
Can't get _GUICtrlMenu_CreatePopup to errr, pop up!
DelStone replied to DelStone's topic in AutoIt General Help and Support
problem is that whether I use the WM_MESSAGE or not, I can't get the popup to appear... -
Try winwait instead of winwaitactive - which app are you trying to automate
-
The link I gave you is trying to click a tab that has not been created in their own app but in outlook: "I'm making a program to automate account creation in outlook 2k3. I get all the fields entered with text, click the "More Settings" button, but I cannot click an individual tab. I want to click the "Outgoing mail server" tab and check "My server requires authentication" is there a way to do this without using send keys, and click by coordinates?"
-
Probably because the app (msi) has to end before it moves on... are you waiting till it terminates before you are checking for a window or is the window you are checking for from the msi app?
-
Have you tried ShellExecute? After running the requested program the script continues with this command. To pause execution of the script until the spawned program has finished the ShellExecuteWait function is usually used - which appears to be what you are doing...
-
You may want to look at which addresses a similar request...
-
DelStone reacted to a post in a topic: An Important Question In AutoIt !!!!!
-
Thanks Dale - problem solved
-
NiVZ reacted to a post in a topic: InetGet problem with downloading mysql installation file
-
Hi all I've tried to download the mysql installation file using $file_to_get = "http://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-5.5.21.0.msi/from/http://mirrors.dedipower.com/www.mysql.com/" InetGet($file_to_get, $file_to_save,1 ,0) However it refuses to dowload - any thoughts why?
-
It's strange that when I call an external program to complete an input box selected in IE via IEACTION($oIE, "clieck") it works fine but when I do the same via an adlibregister function it does not...
-
I have BrewmanNH - it does not seem to work - the program just exits at the point. If I comment out the ensure_visible line, it continues and @error is 0 after the clickitem call... however it does not select the item in the listview which is simply minimized - if it is not minimized, it is selected ok. Is that how the function clickitem is meant to work - it doesn't seem right... $CHndl = ControlGetHandle("Identity Cloaker", "", "SysListView321") _GUICtrlListView_EnsureVisible($CHndl, $row - 1) _GUICtrlListView_ClickItem($CHndl, $row - 1, "left", False, 2)