Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Oooooo oooo oooo i got a bite. This might work. $checkboxarray = _WD_FindElement($sSession, $_WD_LOCATOR_ByCSSSelector, ".x-tree-checkbox", "", True) _ArrayDisplay($checkboxarray)
  3. Not really... just have to get the syntax right. I likely steered you in the wrong direction because that's actually a CSS selector. Try changing $_WD_LOCATOR_ByXPath to $_WD_LOCATOR_ByCSSSelector. If that doesn't work, then you should probably share more details about the element(s) you are attempting to locate (show us the associated HTML).
  4. I certainly appreciate your response. It did change the error message. I seem to be pushing the limit of what can be done. $checkboxarray = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".x-tree-checkbox", "", True) _ArrayDisplay($checkboxarray) __WD_Post: URL=HTTP://127.0.0.1:4444/session/171a5d58-3d1e-4fc7-8843-5363915d5e72/elements; $sData={"using":"xpath","value":".x-tree-checkbox"} __WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid selector","message":"Given xpath expression \".x-tree-checkbox\" is invalid: SyntaxError: The expression is not a legal expression.","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nInvalidSelectorError@chrome://marionette/content/error.js:336:5\nfind_@chrome://marionette/content/element.js:376:11\nelement.find/</findElements<@chrome://marionette/content/element.js:317:17\nevalFn@chrome://marionette/content/sync.js:86:7\nPollPromise/<@chrome://marionette/content/sync.js:101:5\nPollPromise@chrome://marionette/content/sync.js:81:10\nelement.find/<@chrome://marionette/content/element.js:316:24\nelement.find@chrome://marionette/content/element.js:315:10\nfindElementsContent@chrome://marionette/content/listener.js:1170:19\ndispatch/</req<@chrome://marionette/content/listener.js:489:14\ndispatch/<@chrome://marionette/content/listener.js:484:15\n"}} _WD_FindElement: {"value":{"error":"invalid selector","message":"Given xpath expression \".x-tree-checkbox\" is invalid: SyntaxError: The expression is not a legal expression.","stacktrace":"WebDriverError@chrome://marionette/content/error.js:178:5\nInvalidSelectorError@chrome://marionette/content/error.js:336:5\nfind_@chrome://marionette/content/element.js:376:11\nelement.find/</findElements<@chrome://marionette/content/element.js:317:17\nevalFn@chrome://marionette/content/sync.js:86:7\nPollPromise/<@chrome://marionette/content/sync.js:101:5\nPollPromise@chrome://marionette/content/sync.js:81:10\nelement.find/<@chrome://marionette/content/element.js:316:24\nelement.find@chrome://marionette/content/element.js:315:10\nfindElementsContent@chrome://marionette/content/listener.js:1170:19\ndispatch/</req<@chrome://marionette/content/listener.js:489:14\ndispatch/<@chrome://marionette/content/listener.js:484:15\n"}} _WD_FindElement ==> Webdriver Exception: HTTP status = 400
  5. Today
  6. Actually, it will return an array, but only if $lMultiple is True. If not, then it returns a single element id. Here's one way that you could try rewriting your code to use xpath -- $checkboxarray = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, ".x-tree-checkbox", "", True) _ArrayDisplay($checkboxarray)
  7. Not an error in the code, per se. Looking at the latest W3C specs, these are the only supported locator strategies -- So, passing one of the other locator constants will result in the error you received. I'll need to do some research to determine if these need to be removed or if they are valid in other instances.
  8. Highlight Labels on Mouse Hover

    Try this one. #include <GUIConstantsEx.au3> $hGUI = GUICreate("Sample", 200, 300) GUISetBkColor(0xFFFFFF, $hGUI) ; White Color $hlabel_1 = GUICtrlCreateLabel("", 8, 8, 104, 104) ; Keeping this as the Background Label for Enabling on Mouse Hover $hlabel_2 = GUICtrlCreateLabel("", 11, 11, 98, 98) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_3 = GUICtrlCreateLabel("Test 1", 11, 25, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_4 = GUICtrlCreateLabel("Test 2", 11, 45, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_5 = GUICtrlCreateLabel("Test 3", 11, 65, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_6 = GUICtrlCreateLabel("", 8, 119, 104, 104) ; Keeping this as the Background Label for Enabling on Mouse Hover $hlabel_7 = GUICtrlCreateLabel("", 11, 121, 98, 98) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_8 = GUICtrlCreateLabel("Test 4", 11, 125, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_9 = GUICtrlCreateLabel("Test 5", 11, 145, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_10 = GUICtrlCreateLabel("Test 6", 11, 165, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color $hlabel_11 = GUICtrlCreateLabel("Test 7", 11, 185, 98, 20) GUICtrlSetBkColor(-1, 0x008000) ; Green Color GUISetState() Local $ifFlag = False ; If True then Highlight Labels Local $idHov = 0 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch $aInfo = GUIGetCursorInfo($hGUI) ;#cs If $idHov = 0 And $ifFlag = False And _ Not ($aInfo[4] = $hlabel_1 Or $aInfo[4] = $hlabel_2 Or $aInfo[4] = $hlabel_6 Or $aInfo[4] = $hlabel_7) Then GUICtrlSetBkColor($aInfo[4], 0xFFFFFF) ; Change White Color $ifFlag = True $idHov = $aInfo[4] ElseIf $idHov <> $aInfo[4] And $ifFlag = True And _ Not ($aInfo[4] = $hlabel_1 Or $aInfo[4] = $hlabel_2 Or $aInfo[4] = $hlabel_6 Or $aInfo[4] = $hlabel_7) Then GUICtrlSetBkColor($idHov, 0x008000) ; Change Black Color to White $ifFlag = False $idHov = 0 EndIf ;#ce ; $hlabel_6 = GUICtrlCreateLabel("", 8, 119, 104, 104) If ($aInfo[0] > 8 And $aInfo[0] < (8 + 104) And $aInfo[1] > 119 And $aInfo[1] < (119 + 104)) Then GUICtrlSetBkColor($hlabel_6, 0x000000) ; Change White Color to Black GUICtrlSetBkColor($hlabel_1, 0xFFFFFF) ; Change Black Color to White ; $hlabel_1 = GUICtrlCreateLabel("", 8, 8, 104, 104) ElseIf ($aInfo[0] > 8 And $aInfo[0] < (8 + 104) And $aInfo[1] > 8 And $aInfo[1] < (8 + 104)) Then GUICtrlSetBkColor($hlabel_1, 0x000000) ; Change White Color to Black GUICtrlSetBkColor($hlabel_6, 0xFFFFFF) ; Change Black Color to White ElseIf Not ($aInfo[0] > 8 And $aInfo[0] < (8 + 104) And $aInfo[1] > 119 And $aInfo[1] < (119 + 104)) And _ Not ($aInfo[0] > 8 And $aInfo[0] < (8 + 104) And $aInfo[1] > 8 And $aInfo[1] < (8 + 104)) Then GUICtrlSetBkColor($hlabel_1, 0xFFFFFF) ; Change to White GUICtrlSetBkColor($hlabel_6, 0xFFFFFF) ; Change to White EndIf WEnd
  9. Hi Water, Thank you very much for your effort in composing all the words for the string . However, here is the thing. The values that I failed to paste are actually a column of descriptions. It consists up to thousands of characters that resides in another workbook. So far my code only read the one that has less than 250 chars and paste them in new workbook, for each of the description. I have tried passing them as a variable but it doesn't work. If i use array then it will take a lot of memory space and slow down the performance. Any other suggestions if I may request? Thank you
  10. Hi folks, I'm having problems with a screenshot capture script. Let me explain. Everyday I (and my colleagues at work) need to take some screenshots from a web-page. These screenshots are used to compile a report. Normally, I (and others) used to log in into the website and took screenshots of desired graphics and tables. This is tediuos and time consuming. To easy this task I made a script using autoit that basically logs into the website (user and password) and using some clicks, stroke send, coordinates, it is able to generate the graphics and save them to some folders into our network (this script saves arouund 50 pics. It works like a sharm. In order to make things easier, I tried to schedule this script (compiled to a Screnpics.exe file) using task scheduler from windows. We already use this (task scheduler) to run some vbs scripts, some vba excel scripts and so on. The computer used for this tasks is a windows 7 desktop computer. Due to security policies, the computer locks after some time. All this tasks run in the locked computer. My script screenpics.exe runs also from this locked computer. When the computer is unlocked, it does everything as expected. But, when it is locked, all the "pics" are BLACK. As I understand, it runs ok, but, as the "windows" are innactive, it prints what it "sees": a black rectangular. Some details: The web-page with hold the information I need, it only works in Firefox and, because of this it couldn`t be managed by vba or some "getobject" like commands. In fact, it has some flash things that make it impossible to control programatically. So my script is based on mouse move to coordinates, mouse click, screen capture and so one. So, I read many posts trying to figure out a way to overcome this, but... nothing came to mind. My first idea was try to unlock windows. Theses lead me to some posts with no solution. This is worse because I'm not a computer admin, so procedures that need to replace/change the register are not an option. If someone has any idea, I'll be gratefull.
  11. Hey there! I've been developing a artificial intelligence. My first hard task was letting the A.I know when a sentence is found in memory with different words What i tried to do here is simply, get all the words in user sentence that could be used as a identifier example: Steve Jobs then identify the sentence purpose with the words we found in the past "for" loop example: Do/Know/You/Who/Steve/Jobs Compare the example in the following matching sentences in memory. 1-Steve jobs was a known person 2-Do you know who barack obama is? 3-Do you know Steve jobs? 4-Do you know who steve jobs is? 5-How much money steve jobs had Then find the sentence that has way more matches than the other ones, remember that if the identifier words were not found (Steve jobs) then the sentence is invalid. Every sentence has a different answer and is important that the right one is chosen. If there's no more than the half of words in matches, then assign a variable the result of function, such as a return but for a global var. I couldn't figure out how to do that with StringRegExp. I honestly need help with detecting identifiers on memory sentences. I would also like to let the AI know typos, meaning that moeny and money means the same thing. Any help is hugely appreciated.
  12. Yesterday
  13. Have I found an error in the code? I am under the impression that WD_FindElement will return an array so I am assuming that part might work at least it was stated by the code author. But using $_WD_LOCATOR_ByClassName seems incomplete. WD_Post doesn't seem to have a clue how to process the request. My project is 90% complete and I can't get past this point. I have to find some way to generate a list of elements and somehow sequence through them. Thanks for any help. $checkboxarray = _WD_FindElement($sSession, $_WD_LOCATOR_ByClassName, "x-tree-checkbox") _ArrayDisplay($checkboxarray) __WD_Post: URL=HTTP://127.0.0.1:4444/session/56d9c46d-6959-473b-980c-22830313d944/element; $sData={"using":"class name","value":"x-tree-checkbox"} __WD_Post: StatusCode=400; ResponseText={"value":{"error":"invalid argument","message":"Unknown locator strategy class name","stacktrace":""}} _WD_FindElement: {"value":{"error":"invalid argument","message":"Unknown locator strategy class name","stacktrace":""}} _WD_FindElement ==> Webdriver Exception: HTTP status = 400
  14. Network fileread/fileexist issues

    Yes it did, but apparently I'm crazy because for whatever reason.. it works now. I'm included admin checks from the thread below.. seems ok now, turns out I just must not have had admin access?
  15. _DateAdd

    Your second example did not work for me, until I took the () out. What version of AutoIt, and what version of Windows, are you using?
  16. _DateAdd

    Interesting, thank you very much that worked, I appreciate it. Why then does it work when you have the () after the date and time in the second example?
  17. Network fileread/fileexist issues

    When you run it with #requireAdmin, do the credentials you're supplying have access to that network folder?
  18. Network fileread/fileexist issues

    I don't know which account autoit uses generally, but I included #RequireAdmin. And still it seems random as to what I get for the MsgBox error, I swear it's random. How do I check to see if the program has the required rights? MsgBox(0, 0, "This file's existence is: " & FileExists("\\Ic2\public\MacroShare\IC3.txt"))
  19. Network fileread/fileexist issues

    Soooo....what account are you running it under? Does it have access to that location? Running against my server it works just fine: MsgBox(0, "", "This file's existence is: " & FileExists("\\LC-SERV01\Public\Testig\Putty\LIS.CMD")) But I am running it under an account that has access.
  20. Why is my script freezing?

    Here is a little "faux pas" to fix. .... While 1 $nMsg = GUIGetMsg() ; Switch GUIGetMsg() ; <- Not this Switch $nMsg ; <- This Case $GUI_EVENT_CLOSE Exit Case $RUN .... However you fix this, only have one GUIGetMsg() function in each While-Wend loop.
  21. _DateAdd

    Your first one will work if you take the () out after $sDateTime. It is a variable, not a function.
  22. Why is my script freezing?

    At the top of your script add AutoItSetOption ("TrayIconDebug", 1) what that will do is tell you what line your script is stopped on when you hover your mouse over the AI icon in the tray while it's running. I'm not sure if that would help you, but if it would then you can try it.
  23. _DateAdd

    The issue I'm having seems relatively straight forward, but I've run into an issue an I wonder if there is a work around. If I run the code below I get : ==> Variable cannot be accessed in this manner.: #include <Date.au3> $sDateTime = "2016/01/31 23:00:00" $sDateTime2 = _DateAdd('d', 1, $sDateTime()) MsgBox($MB_SYSTEMMODAL, "", "Date: " & $sDateTime2) If I run the code below it works. #include <Date.au3> $sDateTime2 = _DateAdd('d', 1, "2016/01/31 23:00:00"()) MsgBox($MB_SYSTEMMODAL, "", "Date: " & $sDateTime2) Is there a work around for this? I want to take a date that is stored in a variable from earlier in the script and add a day to it.
  24. So for some reason I'm getting an a 0 returned for Fileexists in my main program... Anyone know what is going on? When I map the drive and run the code below, it returns a 1 value so it works correctly. Local $iFileExists = FileExists("X:\MacroShare\IC3A.txt") MsgBox(0, 0, "This file's existence is: " & $iFileExists) When I run the code below in my main program.. SOMETIMES it claims it doesn't exist, and SOMETIMES it works just fine.. Sooo.. help? MsgBox(0, 0, "This file's existence is: " & FileExists("\\Ic2\public\MacroShare\IC3.txt"))
  25. Unable to set a printer font

    Why use Abs()? Value should be negative...
  26. he didn't say he wants to do that automatically, iBut how does he determine that the script needs to be restarted? A total restart may not be necessary: I think OP is having a problem where likely something needs to be clicked but the script is stuck waiting for a colored pixel (or some other check) while the button is already there, so the practical solution should be to have a "skip check" hotkey that sets a flag to skip the current check and click anyways, and then he could use that hotkey example to code appropriate start/stop/pause/skip hotkeys needed for the usual game automations, but that is another story. Ps. Since you are a moderator could you please move this thread to the appropriate category? Pps. I am a newbie to this forum engine too. How can I edit my own posts to integrate additional information instead of submitting multiple posts?
  27. So, I made my script to automate some tedious parts of my work. It works through two GUIs that take information from the user and enacts a process. I set it up so that the first GUI would close itself and open the next once the information had been entered and the button pressed. However, the second GUI takes 5-6 buttons presses to run; it's rather frustrating. Any help would be appreciated. #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.5 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> #include <AutoItConstants.au3> HotKeySet("{`}", "Terminate") Func Terminate() Exit EndFunc ;==>Terminate Login () Func Login () $Login = GUICreate("Login", 300, 80) GUICtrlCreateLabel("Name and Extension:", 10, 15, 85, 25) $idNameExt = GUICtrlCreateInput("", 80, 10, 200, 25) $NEXT = GUICtrlCreateButton("Next", 120, 45, 60, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $NEXT Global $NameExt = GUICtrlRead($idNameExt) GUIDelete($Login) Main () Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd EndFunc Func Main () $MAIN = GUICreate("Loans", 220, 560) GUICtrlCreateLabel("ICN:", 10, 15, 65, 25) $idICN = GUICtrlCreateInput("", 80, 10, 120, 25) GUICtrlSetLimit(-1, 12) GUICtrlCreateLabel("Transit:", 10, 55, 65, 25) $idTransit = GUICtrlCreateInput("", 80, 50, 120, 25) GUICtrlSetLimit(-1, 5) GUICtrlCreateLabel("Queue:", 10, 95, 65, 25) $idQueue = GUICtrlCreateCombo("Lending", 80, 90, 120, 25) GUICtrlSetData($idQueue, "Real Estate|Corp", "Lending") GUICtrlCreateLabel("Case #:", 10, 135, 65, 25) $idCase = GUICtrlCreateInput("", 80, 130, 120, 25) GUICtrlSetLimit(-1, 9) GUICtrlCreateLabel("Serial:", 10, 175, 65, 25) $idSerial = GUICtrlCreateInput("", 80, 170, 120, 25) GUICtrlSetLimit(-1, 10) GUICtrlCreateLabel("Value Date:", 10, 215, 65, 25) $idPVD = GUICtrlCreateInput("", 80, 210, 120, 25) GUICtrlSetLimit(-1, 8) GUICtrlCreateLabel("Amount:", 10, 255, 65, 25) $idAmount = GUICtrlCreateInput("", 80, 250, 120, 25) GUICtrlCreateLabel("Currency:", 10, 295, 65, 25) $idCurrency = GUICtrlCreateCombo("CAD", 80, 290, 120, 25) GUICtrlSetData($idCurrency, "USD", "CAD") GUICtrlCreateLabel("Ordering:", 10, 335, 65, 25) $idOrdering = GUICtrlCreateInput("", 80, 330, 120, 25) GUICtrlCreateLabel("Contra:", 10, 375, 65, 25) $idContra = GUICtrlCreateInput("", 80, 370, 120, 25) GUICtrlSetLimit(-1, 4) GUICtrlCreateLabel("Beneficiary:", 10, 415, 65, 25) $idName = GUICtrlCreateInput("", 80, 410, 120, 25) GUICtrlCreateLabel("Identifier:", 10, 455, 65, 25) $idIdentifier = GUICtrlCreateInput("", 80, 450, 120, 25) GUICtrlSetLimit(-1, 26) GUICtrlCreateLabel("Authorization:", 10, 495, 65, 25) $idAuthorization = GUICtrlCreateInput("", 80, 490, 120, 25) $RUN = GUICtrlCreateButton("RUN", 80, 525, 60, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $RUN Global $ICN = GUICtrlRead ($idICN) Global $Transit = GUICtrlRead ($idTransit) Global $Queue = GUICtrlRead ($idQueue) If $Queue = "Lending" Then $Queue = "LCOMM" ElseIf $Queue = "Real Estate" Then $Queue = "LREAL" Else $Queue = "LCORP" EndIf Global $Case = GUICtrlRead ($idCase) Global $Serial = GUICtrlRead ($idSerial) Global $PVD = GUICtrlRead ($idPVD) Global $Amount = GUICtrlRead ($idAmount) Global $Currency = GUICtrlRead ($idCurrency) Global $Ordering = GUICtrlRead ($idOrdering) Global $Contra = GUICtrlRead ($idContra) Global $Name = GUICtrlRead ($idName) Global $Identifier = GUICtrlRead ($idIdentifier) Global $Authorization = GUICtrlRead ($idAuthorization) If StringLen($ICN) < 12 Then MsgBox(0,'Error','Check ICN') ElseIf StringLen($Transit) < 5 Then MsgBox(0,'Error','Check Transit') ElseIf StringLen($Serial) < 10 Then MsgBox(0,'Error','Check Serial') Else WinActivate ( "Session A" ) WinMove("Session A", "", 1, 1) WinSetState ( "Session A", "", @SW_SHOW ) WinSetState ( "Session A", "", @SW_ENABLE ) WinSetState ( "Session A", "", @SW_MAXIMIZE ) WinSetState ( "Session A", "", @SW_MAXIMIZE ) WinSetState ( "Session A", "", @SW_MAXIMIZE ) Opt("SendKeyDelay", 10) If Not $Case Then Send("1" & "{Enter}") Send("BSC " & $Name & "{F6}") Send($Identifier) Send("{Enter}" & "{Enter}" & "{Enter}" & "{Enter}" & "{Enter}") MouseClickDrag($MOUSE_CLICK_LEFT, 336, 209, 1340, 582, 2) MouseClick("left", 43,55, 5, 1) $Case = StringTrimLeft(ClipGet(), StringInStr(ClipGet(), "Case ID") + 35) $Case = StringTrimRight($Case, StringLen ( $Case ) - 9) $Contra = StringRight ($Case, 4) Send("{F11}") Send("Client Name on the Wire: " & $Name & " / TRN: " & $Transit & "{TAB}") Send("Amount of Funds/Currency: " & $Amount & " / " & $Currency & "{TAB}") Send("Value Date: " & $PVD & " / " & "PVD: " & _NowDate ( ) & "{TAB}") Send("Wire Serial / ICN CA: " & $Serial & " / " & $ICN & "{TAB}") Send("Contra / Currency: " & $Contra & " / " & $Currency & "{TAB}") Send("{PGDN}") Send("Account Number (if listed):" & "{TAB}") Send("Additional Instructions:" & "{TAB}") Send("Authorized by: " & $Authorization & "{Tab}") Send("NAME & EXTENSION: " & $NameExt & "{Enter}") Send("{F12}" & "{F7}") If $Queue = "LCOMM" Then Send("BSCTLSWHLD" & "{Enter}" & "{Enter}" & "{Enter}") ElseIf $Queue = "LREAL" Then Send("BSCTREWS" & "{Enter}" & "{Enter}" & "{Enter}") Else Send("BSCCORPCT" & "{Enter}" & "{Enter}" & "{Enter}") EndIf Send("{F3}" & "{F3}" & "{F3}" & "{F3}" & "{F12}" & "{F12}" & "{F12}") Else Send("2" & "{Enter}") Send("1" & "{Enter}" & "{Enter}" & "{Enter}") Send("{DOWN}" & $Case & "{Enter}" & "{Enter}" & "{Enter}") Send("{F11}") Send("Client Name on the Wire: " & $Name & " / TRN: " & $Transit & "{TAB}") Send("Amount of Funds / Currency: " & $Amount & " / " & $Currency & "{TAB}") Send("Value Date: " & $PVD & " / " & "PVD: " & _NowDate ( ) & "{TAB}") Send("Wire Serial / ICN CA: " & $Serial & " / " & $ICN & "{TAB}") Send("Contra / Currency: " & $Contra & " / " & $Currency & "{TAB}") Send("{PGDN}") Send("Account Number (if listed):" & "{TAB}") Send("Additional Instructions:" & "{TAB}") Send("Authorized by: " & $Authorization & "{Tab}") Send("NAME & EXTENSION: " & $NameExt & "{Enter}" & "{Enter}" & "{Enter}") Send("{F12}" & "{F12}" & "{F12}" & "{F12}" & "{F12}") EndIf WinActivate ("Teller Menu") Opt("SendKeyDelay", 0) Send("!s") Send("!b") Send("!b") Send("!b") Send("!b") Send("!b") Send($Transit) If $Currency = "CAD" Then Send("{F8}" & "{F8}" & "{F8}" & "{F8}" & "{F8}") Sleep ( 100 ) Send("{F8}" & "{F8}" & "{F8}" & "{F8}" & "{F8}") Send("p" & "{TAB}") Send($Amount & "{TAB}" & $Serial & "{TAB}" & "{TAB}" & $Ordering & "{TAB}" & "{PGDN}" & "{TAB}" & "{PGDN}" & "{Enter}") Send("{F9}" & "{F9}" & "{F9}" & "{F9}" & "{F9}") Sleep ( 100 ) Send("{F9}" & "{F9}" & "{F9}" & "{F9}" & "{F9}") Send("{DOWN}" & "{TAB}" & $Amount & "{TAB}" & "1304968" & "{TAB}" & $Queue & " " & $Name & "{TAB}" & $Contra & "{Enter}") Send("!p") Sleep ( 750 ) Send("!e") Send("!e") Send("!e") Send("!e") Send("!e") Else Send("{F10}") Sleep ( 1000 ) Send("{F8}" & "{F8}" & "{F8}" & "{F8}" & "{F8}") Sleep ( 100 ) Send("{F8}" & "{F8}" & "{F8}" & "{F8}" & "{F8}") Send("p" & "{TAB}") Send($Amount & "{TAB}" & "{TAB}" & $Serial & "{TAB}" & "{TAB}" & $Ordering & "{TAB}" & "{PGDN}" & "{TAB}" & "{PGDN}" & "{Enter}") Send("{F9}" & "{F9}" & "{F9}" & "{F9}" & "{F9}") Sleep ( 100 ) Send("{F9}" & "{F9}" & "{F9}" & "{F9}" & "{F9}") Send("{DOWN}" & "{TAB}" & $Amount & "{TAB}" & "1304968" & "{TAB}" & $Queue & " " & $Name & "{TAB}" & $Contra & "{Enter}") Send("!e") Send("!p") Sleep ( 500 ) WinActivate ("Specify GL") Send("!c") Sleep ( 500 ) Send("!e") Send("!e") Send("!e") Send("!e") Send("!e") EndIf WinActivate ("Contra Log") WinActivate ("Contra Log") WinActivate ("Contra Log") Opt("SendKeyDelay", 15) Send(_NowDate ( ) & "{RIGHT}" & $Transit & "{RIGHT}" & "{RIGHT}" & "{RIGHT}" & $Currency & "{RIGHT}" & $Contra & "{RIGHT}" & $Amount & "{RIGHT}" & $Case & "{RIGHT}" & $Queue & " " & $Name) Send("{DOWN}" & "{LEFT}" & "{LEFT}" & "{LEFT}" & "{LEFT}" & "{LEFT}" & "{LEFT}" & "{LEFT}" & "{LEFT}") WinActivate ("Loans") EndIf EndSwitch WEnd EndFunc
  28. Unable to set a printer font

    Setting it to 50 made the print big enough, but not actually a font size of 8. I used this formula to calculate the font height, based on a font size: $iHeight = $iFontSize & $i__LogPixelsY / 72 And in the actual code: $i__LogPixelsY = _WinAPI_GetDeviceCaps($hDC, $LOGPIXELSY) ; $LOGPIXELSY = 90 $ar = DllCall("kernel32.dll", "long", "MulDiv", "long", $iFontSize, "long", $i__LogPixelsY, "long", 72) $iHeight = Abs($ar[0])
  1. Load more activity
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.