Jump to content

Keltset

Active Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by Keltset

  1. Hello Everyone! I have a PHP script that I am trying to convert into AutoIt and have a silly question. Can anyone help me out in converting this one line into AutoIt? The following is the PHP code that works // Sign the request $signature = hash_hmac("sha256", $string_to_sign, $SECRET_ACCESS_KEY, TRUE); // Base64 encode the signature and make it URL safe $signature = urlencode(base64_encode($signature)); I'm trying to figure out how to do this in AutoIt. I found two functions here: https://www.autoitscript.com/forum/topic/165093-funnot-with-hashing-sha256/?do=findComment&comment=1205352 But I cant seem to figure out how to get this to work or get my results to match what the above php code will put out... If there is anyone out there that can show me how to do this I would be forever in your debt! Thanks for the time in reviewing my problem.
  2. Hello, I am trying to get this working and tried to launch SimpleSpy and ex5_chrome. Both are coming up with this error: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "\\box574.bluehost.com@SSL@2078\DavWWWRoot\ad\AI\simplespy.au3" /UserParams +>14:56:21 Starting AutoIt3Wrapper v.2.1.4.4 SciTE v.3.3.7.0 ; Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (3.3.10.2) from:C:\Program Files (x86)\AutoIt3 "\\box574.bluehost.com@SSL@2078\DavWWWRoot\ad\AI\UIAWrappers.au3"(978,82) : warning: $STR_REGEXPMATCH: possibly used before declaration. $iMatch = StringRegExp($propertyActualValue, $propertyVal, $STR_REGEXPMATCH ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ "\\box574.bluehost.com@SSL@2078\DavWWWRoot\ad\AI\UIAWrappers.au3"(978,82) : error: $STR_REGEXPMATCH: undeclared global variable. $iMatch = StringRegExp($propertyActualValue, $propertyVal, $STR_REGEXPMATCH ) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \\box574.bluehost.com@SSL@2078\DavWWWRoot\ad\AI\simplespy.au3 - 1 error(s), 1 warning(s) !>14:56:22 AU3Check ended. Press F4 to jump to next error.rc:2 +>14:56:22 AutoIt3Wrapper Finished.. >Exit code: 2 Time: 1.112 Hoping someone might be able to direct me towards my problems... Or at least this problem as I have to many to be solved... Ha! Tyia
  3. Thank you kindly for the replies. I had posted with the default being 'c' however if the user were to change it I would still need to be able to grab the text dynamically. I was trying to use GUICtrlComboBox_GetCurSel($mycombo) Thank you for the pointer on GuiCtrlRead, I did no realize I could use that on a combo box- I'm not sure why I had not just tried it before. I thank you both very much for the assistance: It is greatly appreciated!!! -K
  4. Hello, I have a combo box that I want to create the selectable options in a dynamic way. So I feel terrible for asking but I'm just not finding it in the search or in the help. It looks like you can only retrieve the number of the item selection, is there a way to grab the actual text content of the selection instead? IE my string is made up like this: $string = '"a|b|c|d|e|f|g", "c"' GUICtrlSetData($GUI_Combo_Action, $string) Because $string would actually be created dynamically I don't know how to associate an action when all I need to know is the actual text value of the selection. In this case, how do I retrieve "c" as it's value instead of "2" I'm so sorry if this has been asked, which I'm sure it has- I'm just tired and not finding what I need for this project. Any help is greatly appreciated. -K
  5. Is it that you don't want to have more than one file for the install? I have my installer script go download everything lol
  6. #include <Misc.au3> Local $hDLL = DllOpen("user32.dll") While 1 If _IsPressed("10", $hDLL) Then ConsoleWrite("_IsPressed - Shift Key was pressed." & @CRLF) ; Wait until key is released. While _IsPressed("10", $hDLL) Sleep(250) WEnd ConsoleWrite("_IsPressed - Shift Key was released." & @CRLF) ElseIf _IsPressed("1B", $hDLL) Then MsgBox(0, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.") ExitLoop EndIf Sleep(200) WEnd DllClose($hDLL) This is directly from the help file and looks like you could easily insert and function into it to simply spam the keys you are after WHILE it is pressed... Look at the line with sleep(250)
  7. I really wish I could but this particular program I'm interacting with, a proprietary company program, does not show anything that I know or have figured out how to work with when I use the autoit window tool for the buttons. It is highly possible that I'm simply not code intelligent enough regarding window controlling. I have been relying on pure coordinate locations and the ImageSearch.dll to make my particular scripts function. This is a menu list with buttons on it. >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.378734a Instance: 2 ClassnameNN: WindowsForms10.Window.8.app.0.378734a2 Name: ToolBar1 Advanced (Class): [NAME:ToolBar1] ID: 2101344 Text: Position: 0, 0 Size: 1276, 38 ControlClick Coords: 914, 22 Style: 0x56010000 ExStyle: 0x00000000 Handle: 0x00201060 This is a selection list... >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.378734a Instance: 2 ClassnameNN: WindowsForms10.Window.8.app.0.378734a2 Name: dgBSReprint Advanced (Class): [NAME:dgBSReprint] ID: 10096394 Text: Position: 16, 40 Size: 400, 376 ControlClick Coords: 151, 147 Style: 0x56010000 ExStyle: 0x00000000 Handle: 0x009A0F0A Then inside the following I have all sorts of buttons and lists of attachments that change >>>> Control <<<< Class: WindowsForms10.Window.8.app.0.378734a Instance: 1 ClassnameNN: WindowsForms10.Window.8.app.0.378734a1 Name: dgvReport Advanced (Class): [NAME:dgvReport] ID: 398756 Text: Position: 12, 44 Size: 743, 258 ControlClick Coords: 474, 55 Style: 0x56010000 ExStyle: 0x00000000 Handle: 0x000615A4
  8. I'm running into the same issue here with the mouse movement- I have a script that I have been trying to figure out how to run when the computer is idle but it takes control of the mouse- I was hoping to be able to enter my script back into a "pause" mode when the user comes back and uses the physical keyboard and mouse and not have the scripted keyboard actions work. Unfortunately my testing of the idle timer check shows that the script moving the mouse considers it input and thus never allows it to think the system is idle... While 1 sleep(1000) MouseMove(3,5) MouseMove(30,555) ConsoleWrite("Idle time| " & _Timer_GetIdleTime() / 1000 & "seconds" & @LF) wend What a huge bummer- my only work around so far has been setting an ini flag in an ini I already have set up for the script to communicate with other scripts I wrote. I had not thought about using the registry which may be a smarter approach to creating a flag. I was really hoping someone may have located an alternative solution that would aid in the op's post here which is the same issue I'm having. The only thing I could think of was monitoring the actual hardware IO but that's out of my scope of abilities.
  9. I'm not sure if this helps but I like to dump it to a text file... Func FuncGetElmentsByTag() Local $oLinks = _IELinkGetCollection($oIE) $txtLinks = FileOpen("links.txt", 2) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") FileWrite($txtLinks, "LINK: " & $oLink.href & @CRLF & "INNERTEXT: " & @CRLF & @CRLF) Next FileClose($txtLinks) ConsoleWrite("Done finding links" & @LF) Local $oElements = _IETagNameAllGetCollection($oIE) $tagname = FileOpen("TagName.txt", 2) For $oElement In $oElements FileWrite($tagname, "Tagname: " & $oElement.tagname & @CRLF & "innerText: " & $oElement.innerText & @CRLF & "-----" & @CRLF) Next FileClose($tagname) ConsoleWrite("Done finding elements" & @LF) EndFunc ;==>FuncGetElmentsByTag You can then do something like this:::: $tags = _IETagNameGetCollection($oIE, "span") For $tag In $tags ;Get name of target tag If String($tag.className) = "the tags class name goes here" Then $target = $tag.innertext EndIf Next _IEAction($target , "click")
  10. Thank you guy's for the help. I was really looking to do it in a browser window I was already automating that does require user interaction for certain things I do not wish to have automated or as part of my script- Dale, Thanks- I think this points me in the direction I need to go with my work, I really appreciate it!
  11. Hello, I have been using the IE UDF for some time and was wondering if someone can help point me in the right direction. I have seen winhttp & http udf's used for creating a session and doing POST/GET requests manually, however I'm trying to figure out how this process is done with an existing IE window. Is this possible or do I actually have to write my script to GET/POST through HTTP and replicate the output to an actual browser window as opposed to just telling the IE window I already have tied to my script to send a specific POST request? I tried searching for examples of this being done so I could learn it, however I was unable to locate anything that helped me get going. I apologize if I did not find it and this has been asked and answered. -K
  12. Hello, If anyone has a spare moment a bit of guidance would be greatly appreciated. I have been looking for this solution when I came across this thread. I have been able to successfully use Locodarwin's UDF when I know that there is a comment in the cell, however when I try to use it on a cell without a comment it breaks my script. I was hoping someone may be able to assist me in solving this problem: #include <Include\ExcelCOM_UDF.au3> #include <Include\Array.au3> $oExcel = _ExcelBookOpen("\\192.168.1.10\path\to\excel.xlsm") $aComments = _ExcelCommentRead($oExcel, "AV144") ConsoleWrite($aComments & " <<Here Are The Comments" & @LF) $aComments = _ExcelCommentRead($oExcel, "AV143") ConsoleWrite($aComments & " <<Here Are The Comments" & @LF) The output I get is: I have tried a various number of different things such as wrapping an if else statement around IsObj to determine if it was an object or not as well as if/then's around @error checking but I can't seem to get it to not break if there is no cell comment present, and I am uncertain how else to look for a comment.
  13. I tried seeking assistance without posting a new thread to no avail, I'm trying to find a way to disable the title bar menu that pops up when you click the top left corner (program icon) in the title bar. This is the menu that says Restore, Move, Size, Minimize, Maximize and Close. I would like no menu to appear at all, is there a simple disable command to do this? Thanks for any assistance in advance it is certainly appreciated! -K
  14. Each row consists of a single set of coords for the x and y positions. $ClickArray[1][0] = 123 $ClickArray[1][1] = 215 $ClickArray[2][0] = 749 $ClickArray[2][1] = 424 row 1 is the coords for one mouse click (x = 123 & y is 215) row 2 is for another set of coords or another mouseclick (x=749 and y=424) If you need to use a group of clicks simply use more than one row. Alternatively you could have multiple arrays for multiple sets of clicks then loop through the array to activate multiple clicks. You should dig into the help file a bit and play around with arrays to determine what would work best for your situation. If you need your script to choose the correct array to work with initially, you can again store the name of the array you used last into the array to ensure you know what your last operation was and have your script pick a different array on it's start than the previous array it chose. I would urge you to play around with arrays and become used to working them and with loops. There is a ton of helpful information in the AutoIt help file to get you going with them.
  15. This may not be the most effective way but it gets the job done... You would probably want to switch the If $TimesRun = 4 Then $TimesRun = 0 to a ubound check to make it more dynamic and allow the array to grow or shrink. #include <Array.au3> $TimesRun = IniRead(@ScriptDir & "/loadtimes.ini","times","run",1) local $ClickArray[5][2] $ClickArray[0][0] = "x" $ClickArray[0][1] = "y" $ClickArray[1][0] = 123 $ClickArray[1][1] = 215 $ClickArray[2][0] = 749 $ClickArray[2][1] = 424 $ClickArray[3][0] = 1249 $ClickArray[3][1] = 724 $ClickArray[4][0] = 549 $ClickArray[4][1] = 224 MouseMove($ClickArray[$TimesRun][0],$ClickArray[$TimesRun][1]) If $TimesRun = 4 Then $TimesRun = 0 IniWrite(@ScriptDir & "/loadtimes.ini","times","run",$TimesRun + 1) edit: I didn't use mouseclick so that it was runnable and you could simply see your mouse move instead....
  16. Huge props on Toast! This is exactly what I need to resolve all of the issues I have been having with Tray Tips Thanks for posting this!
  17. Have you played with Au3Info on the controls to see if AutoIt can see them? If they can you can interact with the controls directly and simply wait for a condition to be met (control button or window to appear) and then activate the control? This method is especially easy to implement if the next button does not exist until the script is ready to continue (i.e. there is a popup box or window created) See: Help> Function Reference > Windows Management > & Help> Function Reference > Windows Management > Controls For some information on interacting with controls directly, rather than using MouseClick -K
  18. Yes MIRC can indeed live log to text, I would enable that feature and scan the text file as you suggest for the word in question. *Glares at evil controls that do not provide their content to the greater environment* -K
  19. When I need -my- scripts to talk to each other I use a ini file to store the communication data, and the other script checks to see if there is new data there in its run loop. If the data is there it grabs the needed variables and then deletes them from the ini to keep it clean. I have a several scripts that I have that I want to run multi-processes on so I use ini's to have them talk to each other all the time. I'm sure there is a better way of resolving the issue but ini's are easy to use Alternatively there are several UDF's for inter-script communication that I have seen while doing searches. -K
  20. Thank you, I will have to look into the use of sqlite as a better implementation of this. I see that there is a sqlite UDF. I suppose it's time for me to dig in and learn how to work with this. This sounds like the better route to go, over my clumsy script that get's by. I appreciate your pointing me towards this! Thanks, -K
  21. Are you trying to register accounts via script with limited interaction? I pretty much gave you the answer to this already but if you can clarify exactly what you are trying to accomplish that would be great.
  22. I appreciate the input, actually I -wanted- to do this as a database because it resolves all of my issues. The problem I have is that I have very limited access on the computer that I'm running this script on and have had to come up with a work around. AutoIt doesn't require any special permissions to run. I definitely know that this project has reached a point where database implementation would be a better approach, but I suppose I have to work with the tools I have available. -K
  23. What I was calling a nested array is an array inside an array inside an array etc... This is all contained in a single script so include is not very relevant to this situation. My script generates about 40-50 excel spreadsheets from several datasources each morning. The main problem I was having is that I had been defining arrays for each user, and each type of report manually: global $user1[25] = [24, "element one", "element two", etc..] global $user2[25] = [24, "element one", "element two", etc..] global $user3[25] = [24, "element one", "element two", etc..] global $user4[25] = [24, "element one", "element two", etc..] Then each element would contain another array or variable depending on the purpose. I was trying to avoid non similar elements in an array and easy addition of extra users, or the removal there of. With the use of a variable in the variable name it is easier to add a user (or remove) and not have to generate new arrays for each user for each type of report generated. Working with the following can become overly complex when you start compounding: global $subArrayAFred[25] = [24, "element one", "element two", etc..] global $subArrayASam[25] = [24, "element one", "element two", etc..] global $subArrayAJasper[25] = [24, "element one", "element two", etc..] global $subArrayABFred[25] = [24, "element one", "element two", etc..] global $subArrayABSam[25] = [24, "element one", "element two", etc..] global $subArrayABJasper[25] = [24, "element one", "element two", etc..] global $subArrayBFred[25] = [24, $subArrayAFred, subArrayABFred, etc..] global $subArrayBSam[25] = [24, $subArrayASam", $subArrayABSam, etc..] global $subArrayBJasper[25] = [24, $subArrayAJasper, $subArrayABJasper, etc..] global $subArrayCFred[25] = [24, "element one", $subArrayBFred, etc..] global $subArrayCSam[25] = [24, "element one", $subArrayBSam", etc..] global $subArrayCJasper[25] = [24, "element one", $subArrayCJasper", etc..] Traversing these becomes to complex to follow without a map. By being able to do $reportOneFred, $reportTwoFred, etc.. it becomes easier to write new reports or modify existing reports and user management becomes less difficult. With the variable included in variable name method I do not need to constantly traverse down an arrays tree to locate the necessary information to manipulate or use.
  24. Ahh yes, I should have been able to determine that myself... *Palm Face* Thank you everyone for your assistance on this issue, it is very much appreciated!! -K
  25. Here is an example of code I use that does something similar to this. You will need to adjust this to do whatever it is you want with the information you obtain... $userName = InputBox("Security Check", "Enter your user name.") $userPassword = InputBox("Security Check", "Enter your password.","","*") $winName = "Proprietary Login" while 1 sleep(1000) If WinExists($winName) And WinExists("Login") Then sleep(1000) ControlSetText("Login","","[NAME:txtUserName]",$userName) sleep(250) ControlSetText("Login","","[NAME:txtPassword]",$userPassword) sleep(250) ControlClick("Login","","[NAME:btnLogin; TEXT:F5-Login]") ConsoleWrite("Logging in" & @CRLF) WinWait("$winName") ControlClick("Login","","[NAME:btnLogin; TEXT:F5-Login]") ConsoleWrite("Logged in good to go!" & @CRLF) EndIf WEnd
×
×
  • Create New...