
[ IE ] Question about set Select Option
By
abiteric, in AutoIt General Help and Support
-
Similar Content
-
By aiter
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?
-
By XinYoung
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.
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <WinAPIFiles.au3>
#include <Array.au3>
#include <File.au3>
#include <Excel.au3>
#include <DateTimeConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIShellEx.au3>
#include <MsgBoxConstants.au3>
#include <Date.au3>
#include <ComboConstants.au3>
#include <guimenu.au3>
#include <IE.au3>
HotKeySet("{F4}", "_Exit")
;Open the file(s) in the selected folder
$extension = ".txt"
$app2openWith = @SystemDir & "\notepad.exe"
Func Begin()
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)
GUISetBkColor(0x000000)
$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")
GUICtrlSetColor(-1, 0x00FF00)
Global $StartBut = GUICtrlCreateButton("Start", 16, 40, 67, 25)
GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0x008000)
$Label2 = GUICtrlCreateLabel("(Press F4 to Exit)", 96, 40, 8000, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FF00)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$UIfunc = GUIGetMsg()
Select
Case $UIfunc = $GUI_EVENT_CLOSE
_Exit()
Case $UIfunc = $StartBut
If GUICtrlRead($url) = "" Then
MsgBox(48, "Um...", "Give me a target you idiot.")
Else
GUICtrlSetState($url, $GUI_DISABLE)
GUICtrlSetState($StartBut, $GUI_DISABLE)
Start()
EndIf
EndSelect
WEnd
EndFunc ;==>Begin
Func Start()
If $loopTrick = 0 Then
Global $oIE = _IECreate(GUICtrlRead($url))
_IELoadWait($oIE)
Again()
ElseIf $loopTrick = 1 Then
Sleep(3000)
_IEAction($oIE, "refresh")
Sleep(3000)
Start()
EndIf
EndFunc ;==>Start
Func Again()
$loopTrick = 1
Start()
EndFunc ;==>Again
Func _Exit()
Exit
EndFunc ;==>_Exit
-
By Ambient
I am trying to build a list from a query run against a sybase db. This part works fine. My problem is this, I want to display values in a list depending
on the value of certain fields i.e. See below which works for two. Unfortunately, I need it to work for 3 values. I don't know how I can do this for 3. I did try doing a select case but I was getting errors.
i.e. if value =0 then "Card Check" if Value = - Then "Card Spend" Else "Money Added"
The below immediate iif works brilliantly for two but as I say I need to build this with 3 different values.
$idItem = GUICtrlCreateListViewItem( _iif($adoRs.Fields("TransactionAmount").value =0, "Card check","Money Added")
Any help appreciated.
-
By mLipok
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)
QUESTION:
Has anyone already encountered such a problem?
Does anyone know any solution or has an idea for further diagnostics?
btw.
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.
EDIT:
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.
-
By Nareshm
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.
-