-
Posts
461 -
Joined
-
Last visited
Profile Information
-
Location
The Netherlands
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
DaLiMan's Achievements

Universalist (7/7)
0
Reputation
-
DaLiMan reacted to a post in a topic: IE - Clicking in <SPAN
-
Hi, I''m having trouble to fire an event in a IE website. Now I found the row / id I need but I don't see an onevent() or something. I tried _IEaction($obj, click) and I tried $obj.fireevent(onmousedown) but since there seem to be no events it does nothing. I don't understand how to fire the event from this id. Attempted in the <span> 'UserList_inner_VXTableRowMenu.edit_SPAN' and on the href 'edit' , but nothing seems to do anything. Any ideas on how to get the <edit> action to fire? Attempt A Func _EditUser() ;--------------------------------------------------------------------- ;Klik op de verborgen knop [Verwijderen] ;--------------------------------------------------------------------- Local $oDelete = _IEGetObjById($oIE, 'UserList_inner_VXTableRowMenu.edit_SPAN') ConsoleWrite("$oDelete IsObj : " & IsObj($oDelete) & @CRLF) _IEAction($oDelete, "focus") _IEAction($oDelete, "click") $oDelete.FireEvent('onmousedown') ;--------------------------------------------------------------------- EndFunc ;==>_EditUser Attemp B Func _EditUser() ;--------------------------------------------------------------------- ;Klik op de verborgen knop [Verwijderen] ;--------------------------------------------------------------------- Local $oDelete = _IEGetObjById($oIE, 'edit') ConsoleWrite("$oDelete IsObj : " & IsObj($oDelete) & @CRLF) _IEAction($oDelete, "focus") _IEAction($oDelete, "click") $oDelete.FireEvent('onmousedown') ;--------------------------------------------------------------------- EndFunc ;==>_EditUser
-
IE event, then click on messagebox
DaLiMan replied to DaLiMan's topic in AutoIt GUI Help and Support
OK, didn't find that one. Thanks for the link, I'll look into adlibregister or a seperate script. -
IE event, then click on messagebox
DaLiMan replied to DaLiMan's topic in AutoIt GUI Help and Support
Sorry, I see it is in the wrong place. Can someone move this to the 'General help'? -
Hi, I'm trying to click the close button in a website at work. To click the button is not a problem, but then a message comes up to ask [are you sure?] I have to click [OK] but the script keeps waiting for the explorer window. So when i manually click the [OK] button, the script continues. Is there any way to not pause the script and hit the [OK] button automatically? PS: When I start a script with the last 3 lines when the messagebox pops up, it works just fine. Attempt 1 Func _Sluiten_btn() ;--------------------------------------------------------------------- ;Klik op de knop [Nieuw 6.2.1 Accordeer personen] ;--------------------------------------------------------------------- Local $oSearch = _IEGetObjById($oIE, 'close_label') _IEAction($oSearch, "click") ;--------------------------------------------------------------------- EndFunc ;==>_Sluiten_btn Attempt 2 Func _Sluiten_btn() ;--------------------------------------------------------------------- ;Klik op de knop [Nieuw 6.2.1 Accordeer personen] ;--------------------------------------------------------------------- Local $oSearch = _IEGetObjById($oIE, 'close_outer') $oSearch.FireEvent("onclick") ;--------------------------------------------------------------------- EndFunc ;==>_Sluiten_btn Works fine to hit OK, but only in a seperate script?! WinWait("[CLASS:#32770]") WinActivate("[CLASS:#32770]") ControlClick("[CLASS:#32770]", "","[CLASS:Button; INSTANCE:1]")
-
IE click <span> based on title or value
DaLiMan replied to DaLiMan's topic in AutoIt General Help and Support
@FrancescoDiMuro Sometimes it's just that simple.... Thanks for setting me back on track. @Danp2 No, it's an environment at work. I didn't realize span could be collected too. Now the code is looking like this. The hard coded value's are ultimately to be $variables. Local $oSearch = _IEGetObjById($oIE, 'form3_ProductHierarchy_SELECTOR') ConsoleWrite("$oSearch IsObj : " & IsObj($oSearch) & @CRLF) Local $oTable = _IETagNameGetCollection($oSearch, "span") ConsoleWrite("$oTable IsObj : " & IsObj($oSearch) & @CRLF) For $oTD in $oTable ConsoleWrite("$oTD: " & $oTD.title & @CRLF) If StringInStr($oTD.title,"254701") > 0 Then _IEAction($oTD, "focus") _IEAction($oTD, "click") ExitLoop EndIf Next Thank you both. -
Hi, I'm trying to figure out how to click on the <span> highlighted in the picture. I thought I needed to get the <DIV> and then get al the <td> but this is not working. The value of the title are created by the website based on a given value in a searchbox. Therefore I need to check if the value of the span is the right one and then click it if so. Both give back an object, but i'm not getting any good results. Any ideas? Local $oSearch = _IEGetObjById($oIE, 'form3_ProductHierarchy_SELECTOR') ConsoleWrite("$oSearch IsObj : " & IsObj($oSearch) & @CRLF) Local $oTable = _IETagNameGetCollection($oSearch, "td") ConsoleWrite("$oTable IsObj : " & IsObj($oSearch) & @CRLF) For $oTD in $oTable ConsoleWrite("$oTD: " & $oTD.value & @CRLF) Next
-
[SOLVED] _IECreate2 and navigate, AccessIsDenied
DaLiMan replied to DaLiMan's topic in AutoIt General Help and Support
Yes, I tried all sorts of websites. Finally yesterday I ....(STUPID ME!)... found out I did not declare the variable of $oIE right. It was set locally in another function. So this was a real waste off time. But thanks for the reply -
[SOLVED] _IECreate2 and navigate, AccessIsDenied
DaLiMan replied to DaLiMan's topic in AutoIt General Help and Support
Hi Danp2, Yes, that was my first try. However, I was not able to solve how to resize the _IE frame along with the parent window. Also sending keys to this embedded IE was not working from my script (behind a button) and it looks like it's somehow not a complete IE or something. usernames and passwords are not remembered etc. -
Hi There, I'm struggling with an embedded IE in a GUI. Trying to automate some buttons to go to 2 different sites with a button. In my GUI I have a IE embedded with _IECreate2 from here. But when I try to navigate it does not allow me to go anywhere. --> IE.au3 T3.0-2 Warning from function _IELoadWait, $_IESTATUS_AccessIsDenied (Cannot verify readyState. Likely casue: cross-domain scripting security restriction. (-2147024891))
-
Hi, Today I got a message my exe file is a trojan [Trojan:Win32/Fuerboos.B!cl] and is very dangerous?! Now ofcourse this is not the case, but MS defender thinks otherwice. Can I re-code my source or something or has this to do with the auto-it compiler? Sourcecode is below: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=BMP\Meso.ico #AutoIt3Wrapper_Res_Comment=Open MesoBoek.accdb boekhouding. #AutoIt3Wrapper_Res_Description=MesoBoek #AutoIt3Wrapper_Res_Fileversion=0.1.0.5 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_LegalCopyright=Mirjam Lith Mesologie #AutoIt3Wrapper_Res_Language=1043 #AutoIt3Wrapper_Res_Field=Auteur|Daniel Lith #AutoIt3Wrapper_Run_Tidy=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;================================================= #INCLUDE settings ======================================================== #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ColorConstants.au3> #include <InetConstants.au3> ;============================================== Optie settings en variabelen ================================================= HotKeySet("{ESC}", "_ExitNow") FileInstall(".\BMP\Meso_met.jpg", @ScriptDir & "\Meso_met.jpg") FileInstall("Meso.ico", @ScriptDir & "\Meso.ico") Dim $url = "http://www.mirjamlithmesologie.nl/MB/version.mb" Dim $urlDB = "http://www.mirjamlithmesologie.nl/MB/MesoBoek.accdb" Dim $curVer = @ScriptDir & "\version.mb" Dim $NewDB = @ScriptDir & "\MesoBoek.accdb" Global $iPID Global $Name = "MesoBoek" Global $DoubleRunChk = $Name & "!" Local $sDBlokatie, $sDBbupLokatie ;~ Local $sDBnaam = "MesoBoek_be" ;~ Local $sDBextentie = ".accdb" ;~ Global $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") Local $DBdata = @ScriptDir & "\Data\MesoBoek_db.accdb" Local $tblname = "tblDBgegevens" Local $query = "SELECT * FROM " & $tblname Local $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object ConsoleWrite("oShell=" & $oShell & @CRLF) ; ================================== Controle of het programma niet dubbel wordt opgestart ================================== If WinExists($DoubleRunChk) Then WinClose(WinGetHandle($DoubleRunChk)) EndIf AutoItWinSetTitle($DoubleRunChk) ;======================================================= Check Data beschikbaarheid ======================================================== $adoCon = ObjCreate("ADODB.Connection") ConsoleWrite("adocon=" & $adoCon & @CRLF) ;~ $adoCon.Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Documents\Boekhouding\Data\MesoBoek_db.accdb;User Id=;Password=;") $adoCon.Open("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & $DBdata & ";User Id=;Password=;") $adoRs = ObjCreate("ADODB.Recordset") $adoRs.CursorType = 1 $adoRs.LockType = 3 $adoRs.Open($query, $adoCon) $sDBlokatie = $adoRs.Fields("DBlokatie").value ;Retrieve value by field name $sDBbupLokatie = $adoRs.Fields("BupLokatie").value ;Retrieve value by field name If $sDBlokatie = Null Then $sDBlokatie = @ScriptDir & "\Data" If $sDBbupLokatie = Null Then $sDBbupLokatie = @ScriptDir & "\Data\BackUp" $adoCon.Close If FileExists($sDBlokatie) = 0 Then MsgBox(64, $Name & " - Foutmelding", "De DataBase verbinding op onderstaande lokatie is niet beschikbaar, herstel de vebinding en probeer opnieuw." & @CRLF & @CRLF & $sDBlokatie) Exit EndIf ;====================================================== GUI settings========================================================== #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 508, 247, 192, 124, BitOR($WS_BORDER, $WS_POPUP), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW)) GUISetBkColor(0xFFFFFF) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Meso_met.jpg", 24, 16, 73, 89) $Label1 = GUICtrlCreateLabel("MesoBoek - Daniel Lith - 2016", 360, 224, 147, 17) $Label2 = GUICtrlCreateLabel("MesoBoek", 136, 32, 268, 69) GUICtrlSetFont(-1, 42, 400, 0, "Arial") $Label3 = GUICtrlCreateLabel("", 28, 144, 460, 17) $btnUpdate = GUICtrlCreateButton("Update", 384, 184, 89, 25) GUICtrlSetState(-1, $GUI_HIDE) $btnNoUpdate = GUICtrlCreateButton("Nu niet", 280, 184, 89, 25) GUICtrlSetState(-1, $GUI_HIDE) $Progress = GUICtrlCreateLabel("", 24, 164, 5, 17) GUICtrlSetBkColor(-1, 0x17D81B) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;======================================================= RUN program ======================================================== While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case Else _VersieControle() Sleep(1000) _Startup() Sleep(2000) _Progressor(460, "Klaar.") Sleep(300) Exit EndSwitch WEnd Func _VersieControle() _Progressor(50, "Verbinding maken met server.") Local $sCurVersie = FileRead($curVer) ;~ MsgBox(0, "", $dFile) ; Read the file without downloading to a folder. The option of 'get the file from the local cache' has been selected. Local $dData = InetRead($url, 19) ; Convert the ANSI compatible binary string back into a string. Local $sOnlineVersie = StringRegExpReplace(BinaryToString($dData), '\s', "") ;~ Local $sOnlineVersie = InetGetInfo($dData) ; Display the results. ;~ MsgBox($MB_SYSTEMMODAL, "", $sOnlineVersie) If $sCurVersie < $sOnlineVersie Then GUICtrlSetState($btnUpdate, $GUI_SHOW) GUICtrlSetState($btnNoUpdate, $GUI_SHOW) _Progressor(100, "Nieuwe versie [v." & $sOnlineVersie & "] beschikbaar. Nu updaten?") While 1 ;~ Local $msg = MsgBox($MB_OKCANCEL + $MB_ICONWARNING, "Update", "Wilt u nu een update uitvoeren?") $nMsg = GUIGetMsg() Switch $nMsg Case $btnNoUpdate _Progressor(250, "Verder zonder updaten.") ExitLoop Case $btnUpdate _Progressor(250, "Downloaden nieuwe versie") FileSetAttrib($curVer, "-H") Local $dGet1 = InetGet($url, $curVer, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(250) Until InetGetInfo($dGet1, $INET_DOWNLOADCOMPLETE) FileSetAttrib($curVer, "+H") Local $dGet2 = InetGet($urlDB, $NewDB, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(250) Until InetGetInfo($dGet2, $INET_DOWNLOADCOMPLETE) ExitLoop EndSwitch WEnd Else If $sOnlineVersie = "" Then _Progressor(280, "Kan geen verbinding met server maken.") Else _Progressor(280, "U heeft de laatste versie.") EndIf EndIf EndFunc ;==>_VersieControle Func _Startup() _Progressor(380, "Bezig met opstarten MesoBoek") $iPID = ShellExecute(@ScriptDir & "\MesoBoek.accdb") ConsoleWrite("PID: " & $iPID & @LF) EndFunc ;==>_Startup Func _Progressor(Const $procent, Const $dText) GUICtrlSetPos($Progress, 24, 164, $procent) GUICtrlSetData($Label3, $dText) EndFunc ;==>_Progressor Func _ExitNow() Exit EndFunc ;==>_ExitNow
-
Okay, so the problem for crypt should be on my PC. But I'll just stick with 7zip for he extra benefits. Thanks all for replying and helping.
-
That's strange. Are you running another version ? And could that be the cause? But after messing with 7zip commandline, I see there is another benefit I have not thought of and involves the reason why zip files exist. It shrinks my backup with an amazing factor.
-
Running Autoit 3.3.14.2
-
Also tried the demo(s) from the help file. But it gives me the same problem.
-
Still strange the function _Crypt_EncryptFile() corrupts the DB. I wonder why, do you have any clou on this? But the 7zip commandline works for my local test file. So I'll propably go with this one.