I created a webpage using the IE udf. Great, but then I noticed I cannot do a ctrl-F to find something on the page.
If I save the page then bring that page up I can find things of course.
Its trivial really, but is there way to get the ctrl-F to work when the page is generated without resorting to having to save?
For fun, I'm building an app that opens a webpage and refreshes it every 30 seconds.
But once the script performs _IEAction($oIE, "refresh"), the GUI closes.
Any help is appreciated.
;Open the file(s) in the selected folder
$extension = ".txt"
$app2openWith = @SystemDir & "\notepad.exe"
Global $loopTrick = 0
#Region ### START Koda GUI section ### Form=c:\users\mchu\downloads\autoit\my code\form1.kxf
Global $UI = GUICreate("Hit Em Up!", 256, 113, -1, -1)
$menu = _GUICtrlMenu_GetSystemMenu($UI)
_GUICtrlMenu_EnableMenuItem($menu, $SC_CLOSE, 1, False)
Global $url = GUICtrlCreateInput("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 81, 8, 160, 21)
$Label1 = GUICtrlCreateLabel("Target:", 16, 8, 55, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
Global $StartBut = GUICtrlCreateButton("Start", 16, 40, 67, 25)
GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("(Press F4 to Exit)", 96, 40, 8000, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
#EndRegion ### END Koda GUI section ###
$UIfunc = GUIGetMsg()
Case $UIfunc = $GUI_EVENT_CLOSE
Case $UIfunc = $StartBut
If GUICtrlRead($url) = "" Then
MsgBox(48, "Um...", "Give me a target you idiot.")
If $loopTrick = 0 Then
Global $oIE = _IECreate(GUICtrlRead($url))
ElseIf $loopTrick = 1 Then
$loopTrick = 1
I have some problems with windows explorers.
Here is my testing snippet:
;~ #RequireAdmin _Example() MsgBox(1, '', '@error = ' & @error & @CRLF & '@extended = ' & @extended) Func _Example() Local $oShell = ObjCreate("shell.application") If @error then Return SetError(1, @extended, 0) Local $oShellWindows = $oShell.windows If @error then Return SetError(2, @extended, 0) If $oShellWindows = Null Then Return SetError(3, 0, 0) Local $iCount = $oShellWindows.Count If @error then Return SetError(4, $iCount, 0) Return SetExtended($iCount,1) EndFunc ;==>_Example Normally this should return in extended number of opened InternetExplorer + WindowsExplorer.
But in some cases I encounter a problem with this, as there happens situation when @extended returns 0 even if I had already opened IE.
Here is one of them:
I have some script which is working fine with IE on about 100 computers.
In this specyfic case this script starts his work, and after few minutes he stoped works.
All the time IE is still responsive, I can click on elements and go to specyfic places.
Restoring the script did not help because _IEAttach () does not work.
All you need to do is restart InternetExplorer.
As a result of all my investigation I had done you can see this script snippet above.
In my case My primary script was doing their job, but when he stops, IE was still responsive but this above snippet starts to return @error=0 and @extended = 0 when @extended should be at least =1 (this opened Internet Explorer instance)
Has anyone already encountered such a problem?
Does anyone know any solution or has an idea for further diagnostics?
I have one solution which would fix it - I mean Windows reinstall, but this is not good solution, as I always like to know the esense of the problem.
I know you can say show the script........ this is not possible you have no access to this site, and about 100 computers works well, so this i not related to my script.
The more so that the problem is not related to my main scripts, and the problem is simply how IE behaves - which is illustrated by the above piece of code.
i want to repeat this function
_IELoadWait($oIE, "url 2") $checkb = _IEGetObjById($oIE,"checkb") _IEAction($checkb,"click") $img = _IEGetObjById($oIE,"img") _IEAction($img,"click") _IELoadWait($oIE, "url 1") $btnfy = _IEGetObjById($oIE,"btnvfy") _IEAction($btnfy,"click") until my targeted webpage not found.
I'm trying to click a button on a web page. I have added a couple of MsgBox lines to allow me to watch what happens on the page. As you can see the first half of my script enters data into text boxes on the page. I have no problem there. I just cannot click on the region buttons. The "set focus" line causes an outline to appear around the EU button and the "click button" line causes the "Pick a Region" text to disappear. Here is the code I have so far.
#include <IE.au3> Local $oIE = _IECreate("http://questchecker.com/") Local $iQuestID = "123456" Local $sCharacterName = "CharacterName" Local $colForms = _IEFormGetCollection($oIE) $iCount = 0 For $oForm In $colForms $oFormElements = _IEFormElementGetCollection($oForm) For $oFormElement In $oFormElements $iCount = $iCount + 1 Local $sTagName = StringLower($oFormElement.tagName) Local $sElementType = $oFormElement.type Local $sElementName = $oFormElement.name Switch $iCount Case 6 _IEFormElementSetValue($oFormElement, "MyRealm", 0) ; realm Case 7 _IEFormElementSetValue($oFormElement, $sCharacterName, 0) Case 8 _IEFormElementSetValue($oFormElement, $iQuestID, 0) EndSwitch Next Next Local $oButtons = _IEGetObjByName($oIE, "questForm") For $oButton In $oButtons If _IEFormElementGetValue($oButton) = "US" Then MsgBox(0, "", "Click Okay to set focus") _IEAction($oButton, "focus") MsgBox(0, "", "Click Okay to click button") _IEAction($oButton, "click") ExitLoop EndIf Next MsgBox(0, "", "Click Okay to quit") _IEQuit($oIE) Exit