
Magikarp7
Active Members-
Posts
22 -
Joined
-
Last visited
Everything posted by Magikarp7
-
Script needing to run as admin.
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Thanks! will do. -
Script needing to run as admin.
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Thank you for the reply! Unfortunately, I am the only developer in our office so only my station has Autoit. I had to make the executable everytime I need to test it. The error usually runs from _IECreate() before the automation starts. The GUis are working fine until the IECreate is triggered. The IE window is originally hidden but will show up with an error messagebox on top saying that "The requested action with this object has failed". Then the GUi crashes. I strongly believe that there are some security involvement here. Do you have any ideas? -
Hi guys, I made an automating script for my company that will automatically open an IE browser and enter our company site, then put an employee's credentials automatically so they can login and do automated actions from there. So the thing is that it's working perfectly on my station on my specific company login. But when I try to make my co-workers use the tool it will show an error: "The requested action with this object has failed" So one resolution I thought was to notify the IT guy. I run my tool "As Admin" and told the IT guy to put his credentials for testing. To my surprise, the tool worked like a charm after running as admin. Why is this happening? I did not put any #RequireAdmin on the script. I just put #NoTrayIcon. The tools runs when my co-workers use it but it crashes when trying to open the browser and putting the credentials. I think this is some security problems I need to deal with. Already notified my boss about it but will take time for a reply since it's Sunday. I need help guys. Please. Im gonna cry here.
-
Thanks! gonna try it.
-
Hi guys, I am currently programming for my company. The idea is to automatically "tag/track" their progress by automating IE procedures. So basically, I am eliminating their interaction to IE when tracking their progress. I am getting this error on some occasions and I don't know why. --> IE.au3 T3.0-2 Warning from function _IELoadWait, $_IESTATUS_AccessIsDenied (Cannot verify readyState. Likely casue: cross-domain scripting security restriction. (-2147024891)) The full process is: The executable will automatically log-in the user, check some radiobuttons, write some comments and then press a save button to record their progress, all of these are automated. The window is hidden and I'll show a part of my code and edit some parts (for privacy). Hope someone can give me help. will appreciate it. Func TESTING() $TagWindow = _IECreate($Url, 0, 0, 1, 1) $oForm = _IEFormGetObjByName($TagWindow, "frmLogin") $oUser = _IEFormElementGetObjByName($oForm, "txtUserName") ;username _IEFormElementSetValue($oUser, $Username) Local $oPass = _IEFormElementGetObjByName($oForm, "txtpassword") ;password _IEFormElementSetValue($oPass, $Password) If $oForm.action <> "0" And Not StringInStr($oForm.action, '.php') Then ;submit _IEFormSubmit($oForm, 0) EndIf _IELoadWait($oForm) $TagSource = _IEDocReadHTML($TagWindow) If StringInStr($TagSource, "Your Login ID/Password may be incorrect") > 0 Then MsgBox(262208, "", "Your Login was invalid! Call will be recorded as Untagged. Please tag this call manually.") Else MsgBox(262208, "", "Tagging in progress...", 0.5) EndIf $TagStart = _IEFormGetObjByName($TagWindow, "FrmEntry") If IsObj($TagStart) Then If $CallType = "AA" Then _IEFormElementRadioSelect($TagStart, "AA", "RadCallDisp", 1, "byValue") Sleep(250) ElseIf $DnisType = "BB" Then _IEFormElementRadioSelect($TagStart, "BB", "RadCallDisp", 1, "byValue") Sleep(250) EndIf _IEFormElementRadioSelect($TagStart, "AAAAAAAAAAA", "RadSaleNonSale", 1, "byValue") Sleep(300) $oText = _IEFormElementGetObjByName($TagStart, "txtDNS") _IEFormElementSetValue($oText, $TEXT) $oSelect = _IEFormElementGetObjByName($TagStart, "drpCategory") $oSelect2 = _IEFormElementGetObjByName($TagStart, "drpSubCategory") _IEFormElementOptionSelect($oSelect, $TEXT2, 1, "byText") Sleep(300) _IEFormElementOptionSelect($oSelect2, $TEXT3, 1, "byText") $oText = _IEFormElementGetObjByName($TagStart, "txtCallComments") _IEFormElementSetValue($oText, $TEXT4) Local $oSave = _IEGetObjById($TagStart, "btnSave") ;button save _IEAction($oSave, "click") EndIf _IEAction($TagWindow, "quit") EndFunc
-
Compiling script has no selection (x64 or x86)
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Do you have the download link to that? I am currently using my office internet so my access is limited. If you can provide me a link to that version so I can notify the tech dudes here I would appreciate it. Thank you! -
Compiling script has no selection (x64 or x86)
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Thanks for the reply Jos, it just shows this on the panel when I compile. >"C:\Program Files (x86)\AutoIt3\SciTE\..\aut2exe\aut2exe.exe" /in "C:\Users\123\Desktop\123 abc Project\blabla remake v1 (BETA).au3" >Exit code: 0 Time: 2.624 It acts normally but the .exe file is made instantly without the popup prompts before I compile. -
Hi guys. I have a program here that when I am trying to compile to make the .exe file, the window that usually pops out (where you can select x64 or x86) is gone. It just straights up makes the .exe file without any configurations by me beforehand. Why is this happening? Also my autofill for variables and functions I assigned do not work when coding on the editor. For example I assigned the variable $check. When I type in $che there will be no autocomplete suggestions. I need to type in the whole variable/function everytime. Is there something missing in my installation? any help would be appreciated.
-
Thanks man. is there any way you can make an example when you get back? All I really know is the objevent function I made. I think there are still other functions for the IE onclick event I don't know yet. Thank you.
-
Hi thank you for the reply! Do you have any idea how I can fix this? I tried putting the radiobutton statements inside the "onclick" function to no avail. Any help would be appreciated.
-
Hi. I am currently making a program for my office and I am having serious trouble with the "onclick" event in IE. The scenario is that I am given a selection of radioboxes and an "Ok" button. What I need to do is when I click the "Ok" button, the radiobox that is checked should give me a messagebox with the value I assigned for it. The problem is that if I check random radioboxes until I choose the final one and then click the OK button, the messagebox repeatedly appears, giving me the last radiobox in the messagebox depending on how many times I "randomly" check a radiobox in IE. Please help me. someone. Here is a sample code. AdlibRegister("MyFunc") Func MyFunc() If WinExists($exitWindow) then $ToolExit = _IEAttach("Exit -- Webpage Dialog", "embedded") $ExitForm = _IEFormGetObjByName($ToolExit, "form") $SiteExitOkbtn = _IEGetObjById($ToolExit, "okButton") ;THE RADIOBOXES If(_IEFormElementRadioSelect($ExitForm, "Exit:1", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 1" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:2", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 2" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:3", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 3" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:4", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 4" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:5", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 5" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:6", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 6" ElseIf(_IEFormElementRadioSelect($ExitForm, "Exit:7", "Option", -1, "byValue")) Then $Variable = "You clicked radiobox exit 7" EndIf $oevent = ObjEvent($SiteExitOkbtn, "_EXIT_CLICK_HANDLER_") Endif EndFunc Func _EXIT_CLICK_HANDLER_onclick() AdlibUnregister("MyFunc") MsgBox(0,"","You chose " & $Variable & "!!!") EndFunc ;==>_EXIT_CLICK_HANDLER_onclick I think it has something to do with the ObjEvent. I'm at my limits on that function. Can someone help me? I just need to get the value of the final radiobox checked when I click the Ok Button. but the messagebox keeps reappearing.
-
Hi! I need help tracking down an IE window closed when I use _IEAttach. So for example I use _IEAttach("blablabla", "url") I also have a GUI on the background that tracks progress on the IE instance. The problem is that when I close the IE window, the GUI tool also closes. I am getting random errors like: Return SetError($_IESTATUS_Success, 0, $oObject.document.getElementById($sID)) Return SetError($_IESTATUS_Success, 0, $oObject^ ERROR It's really hard to explain I will try to post a code here. The problem is basically I use "Adlibregister" to wait for an IE window. When that IE window is detected, the GUI starts to track what you do on the IE window. But when the IE window is closed, the GUI is also forced to close and thus the whole program. I uploaded a sample code. I know the code is a failure. I need some examples please! how do I restart an Adlibregister when I close the IE instance? Thank you!
-
Enter Hotkey for custom calculator
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Hi! I was trying to make a program with an in-built calculator on a separate tab. The calculator works fine with the operators. But the problem is that when I press the "Enter" key it only functions on the form and when I focus on an internet browser, like GOOGLE, the enter key won't work anymore when I type something in google. I know that the program is still running. But I set the hotkeys to not work when the GUIform is not active. How do I fix this? Any help will be appreciated! Gonna post some snippets of the code.The calculator has 2 inputboxes. One inputbox is for the output and the other is a real time tracker of what the user types in. Func PressEqual() If WinActive($TrackerForm) Then MsgBox(0,"","Enter working!") EndIf EndFunc Switch GUICtrlRead($Tab1) Case 3 ;this is the tab where my calculator is programmed. If WinActive($TrackerForm) Then HotKeySet("{NUMPAD0}", "Press0") HotKeySet("{0}", "Press0") HotKeySet("{NUMPAD1}", "Press1") HotKeySet("{1}", "Press1") ;... ;etc. etc. etc. for the other hotkeys. HotKeySet("{+}", "PressAdd") EndIf Case Else HotKeySet("{NUMPAD0}") HotKeySet("{0}") HotKeySet("{NUMPAD1}") ;... ;etc. etc. etc. for the other hotkeys.. HotKeySet("{ENTER}") EndSwitch Func PressAdd() If WinActive($TrackerForm) Then $getCalcresult = GUICtrlRead($calcresult) ;this inputbox displays the result $getCalcreader = GUICtrlRead($calcreader) ;real time inputbox. If $getCalcresult = "" And $getCalcreader <> "" Then $FirstNum = GUICtrlRead($calcreader) GUICtrlSetData($calcresult, $FirstNum & " + ") EndIf If $getCalcresult <> "" And $getCalcreader <> "" Then If StringInStr($getCalcresult, "+") Then $FirstNum = $getCalcresult + $getCalcreader GUICtrlSetData($calcresult, $FirstNum & " + ") EndIf If StringInStr($getCalcresult, "-") Then $FirstNum = $getCalcresult - $getCalcreader GUICtrlSetData($calcresult, $FirstNum & " + ") EndIf If StringInStr($getCalcresult, "*") Then $FirstNum = $getCalcresult * $getCalcreader GUICtrlSetData($calcresult, $FirstNum & " + ") EndIf If StringInStr($getCalcresult, "/") Then $FirstNum = $getCalcresult / $getCalcreader GUICtrlSetData($calcresult, $FirstNum & " + ") EndIf EndIf GUICtrlSetData($calcreader, "") EndIf EndFunc -
Hi! I was trying to make a program with an in-built calculator on a separate tab. The calculator works fine with the operators. But the problem is that when I press the "Enter" key it only functions on the form and when I focus on an internet browser, like GOOGLE, the enter key won't work anymore when I type something in google. I know that the program is still running. But I set the hotkeys to not work when the GUIform is not active. How do I fix this? Any help will be appreciated! Gonna post some snippets of the code. Func PressEqual() If WinActive($TrackerForm) Then MsgBox() EndIf EndFunc
-
Help with timezone display?
Magikarp7 replied to Magikarp7's topic in AutoIt General Help and Support
Thank you so much! -
Hi guys! Can someone help me display the time on a specific time zone represented by a label? $Form2 = GUICreate("Form2", 405, 294, 142, 192) $Label1 = GUICtrlCreateLabel("Label1", 48, 48, 36, 17) ;EST $Label2 = GUICtrlCreateLabel("Label2", 48, 88, 36, 17) ;PST etc etc. GUISetState(@SW_SHOW) Sorry I'm still a beginner on this language but I'm glad the people in this community are helpful! I know I have to use the _Date_Time_GetTimeZoneInformation function but I can't seem to understand it clearly. I want to display the PST, MST, CST, and EST time in a Label or an Inputbox if possible. and can I do it in a 12 Hr format? with the AM/PM label? any help would be appreciated. or any small examples. Cheers!
-
Here is my code for one function: Func Tracker() ; tracks if a new and similar IE window is opened. Global $StartUp = WinGetHandle("[Class:IEFrame;Title:FTD - Single Sign-On]") If $windowNumber = 0 And WinExists($StartUp) Then Local $winListT = WinList() $winIndexT = _ArrayFindAll($winListT,"Sign-On",Default,Default,Default,3,0) If UBound($winIndexT) = 2 Then $firstWdw = $winListT[$winIndexT[0]][1] $windowNumber = $windowNumber + 1 ;~ MsgBox(0,"","Handle is: " & $firstWdw) EndIf WinGetProcess If $windowNumber = 1 Then If WinExists("[Class:IEFrame;Title:FTD - Single Sign-On;Handle:"&$firstWdw&"]") Then ;~ MsgBox(0,"","Working till here!") Local $winListT2 = WinList() $winIndexT2 = _ArrayFindAll($winListT2,"Sign-On",Default,Default,Default,3,0) If UBound($winIndexT2) = 4 Then $firstWdw = $winListT[$winIndexT[1]][1] $secondWdw = $winListT[$winIndexT[0]][1] AdlibRegister("Qdetect") $windowNumber = $windowNumber + 1 ;~ MsgBox(0,"","First handle is: " & $firstWdw & " Second handle is: " & $secondWdw) AdlibUnRegister("Tracker") EndIf EndIf EndIf EndIf EndFunc The thing is I am trying to separate two instances of the "[Class:IEFrame;Title:FTD - Single Sign-On]" when I open a new window. But when I try to open another IE to open the same page. the program still recognizes the first window. I want the program to remember the first window and the newly opened window. Any tips?
-
yess! that's what i'm trying to do! basically for example I am making a presentation on one IE instance. I plan to make another one on a separate IE instance to make my work faster. And my program needs to track the progress of that "new" IE window I open. The current program only tracks one work at a time so it's a hassle. I want to be able to do 2 or 3 at a time. but i need to know how to detect the newly opened windows.
-
I'm getting the idea now! the problem is that the Window info generates a unique handle for each open browser. Do you have any idea how i can call those new instances? its making my head spin. calling only one instance is easy since I only have to call it by title and class. but another one just hurts my head.
-
I am currently working on a program for work that when you open a specific page, a timer starts and records your progress. Its just that I was prompted to make the program able to track/detect multiple instances of same processes. For example the window class is "MozillaWindowClass"(i use IE of course. This is just for example.) and the Title is "Create New Topic". I need to detect a new instance with the same title and class! I can see on the autoit window info a different handle. how do I track them? I need help. Anyone please. I'm going crazy. when I try to tweek the code the 2nd timer starts at the same time as the first timer. im gonna go crazy!