Jump to content
asakust

Subtraction Causing Extra Decimal Places - SOLVED

Recommended Posts

asakust

Having some issues here... I'm trying to pull two numbers from a .tab text file, and one from an internal control inside another program. The only field I can access is the static text control that the program, and when I'm trying to subtract the two to double-check my numbers, I'm getting extra decimals added in. I'm not sure where they're coming from.

I've tried using Round() to drop it down to 2 places, in the current iteration I'm trying to use StringFormat to cut it down to 2 places, but every time I try it out, an extra 0.000000001 or so is added to the $vDifference variable. Here's my code (it's sloppy, forgive me - first attempt at GUIs as well).

 

UPDATE: Solved. Melba is a genius, and I have no idea how to syntax.

 

#include <File.au3>
#include <FileConstants.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

;~ Declare Variables
Global $vSourcePlanName
Global $vSourceRxNum
Global $vSourceRxPaid
Global $vIsolatedRxDate
Global $vIsolatedRxNum
Global $vIsolatedRxPaid
Global $vRunningTotal
Global $aTextArray
Global $vSourceArrayLine
Global $aPlanArray
Global $vPlanName
Global $vPlan
Global $vNocTotal
Global $vTabFile = "C:\Users\Owner\Downloads\EPIC_PaymentReport.tab"
Global $vPioneerClass = "0.2804c64"
Global $pButton = "[CLASS:WindowsForms10.BUTTON.app."
Global $pEdit = "[CLASS:WindowsForms10.EDIT.app."

;~ Create array from payment .tab file
Func CreatePaymentArray()
   _FileReadToArray ($vTabFile, $aTextArray, Default, @TAB)

;~ Create Result Array to be filled with data
Global $aResultArray[0][4]

;~ Check if $aTextArray is valid and pull variables from it
   If IsArray($aTextArray) Then
      $iMax = UBound($aTextArray)
      For $i = 0 to $iMax -1;

;~ Save Plan Name to Variable
         $vSourcePlanName = $aTextArray[$i][1]

;~ Save Rx Date to Variable
         $vSourceRxDate = $aTextArray[$i][2]
         Local $vSourceRxDateYear = StringRight($vSourceRxDate,4)
         $vSourceRxDate = StringReplace($vSourceRxDate,"/","")
         $vSourceRxDate = $vSourceRxDateYear & StringTrimRight($vSourceRxDate,4)

;~ Save Rx Number to Variable, Strip White Space, and - if no text - change to Number
         $vSourceRxNum = $aTextArray[$i][3]
         $vSourceRxNum = StringStripWS($vSourceRxNum, $STR_STRIPALL)
         If StringIsDigit($vSourceRxNum) Then
            $vSourceRxNum = Number($vSourceRxNum)
         EndIf


;~ Save Rx Paid Amount to Variable and change to Number
         $vSourceRxPaid = $aTextArray[$i][5]
         $vSourceRxPaid = StringStripWS($vSourceRxPaid, $STR_STRIPALL)
         If StringIsDigit($vSourceRxPaid) Then
            $vSourceRxPaid = Number($vSourceRxPaid)
         EndIf

;~ Add Payment Data to $aResultArray
         $vSourceArrayLine = $vSourcePlanName & "|" & $vSourceRxDate & "|" & $vSourceRxNum & "|" & $vSourceRxPaid
         _ArrayAdd($aResultArray, $vSourceArrayLine)
      Next

;~    _ArrayDisplay($aResultArray, "Result Array", Default, 8)
   EndIf


;~ Create $aPlanArray - an Array of Plan Names
   $aPlanArray = _ArrayUnique($aResultArray)
;~ _ArrayDisplay($aPlanArray)
   Global $iPlanMax = UBound($aPlanArray)
EndFunc


;~ Create GUI
Func CreateWindow()
   Local $hGUI = GUICreate("Apply Payments", 285, 250, 550, 300, -1)
   Local $idComboBox = GUICtrlCreateCombo("Choose Insurance Plan",10,10,230)
   Local $vPaymentDateLabel = GUICtrlCreateLabel("Payment Date:",10,152)
   Local $vPaymentDateInput = GUICtrlCreateInput("mm/dd/yyyy",85,149,75)
   Local $vEpicDateLabel = GUICtrlCreateLabel("EPIC Date:",10,175)
   Local $vEpicDateInput = GUICtrlCreateInput("mm/dd/yyyy",85,171,75)
   Local $idOkButton = GUICtrlCreateButton("OK",250,8,25,25)
   Local $idOpenButton = GUICtrlCreateButton("Open...",10,215,50)
   Local $idContinueButton = GUICtrlCreateButton("Continue",120,215,75)
   GUICtrlSetState($idContinueButton,$GUI_DISABLE)
   Local $idCancelButton = GUICtrlCreateButton("Cancel",200,215,75)
   Local $vPlanLabel = GUICtrlCreateLabel("Insurance Plan Selected: ", 10, 40)
   Local $vPlanSelect = GUICtrlCreateLabel("None", 135, 40, 120)
   Local $vNocLabel = GUICtrlCreateLabel("Number of Claims: ", 10, 60)
   Local $vNoc = GUICtrlCreateLabel(0,100,60,20)
   Local $vTotalPayLabel = GUICtrlCreateLabel("Total Payment Amount: ", 10, 80)
   Local $vTotalPayAmt = GUICtrlCreateLabel(0,125,80,75)
   Local $vMinDateLabel = GUICtrlCreateLabel("Date Range - From ", 10, 100)
   Local $vMinDate = GUICtrlCreateLabel("yyyyMMdd", 105, 100)
   Local $vMaxDateLabel = GUICtrlCreateLabel("To ", 87, 120)
   Local $vMaxDate = GUICtrlCreateLabel("yyyyMMdd", 105, 120)



   GUICtrlSetState(-1, $GUI_DROPACCEPTED) ; to allow drag and dropping
   GUISetState(@SW_SHOW)

   If IsArray($aPlanArray) Then
      For $i = 3 to $iPlanMax -1;
         $vPlanName = $aPlanArray[$i]
         GUICtrlSetData($idComboBox,$vPlanName)
      Next
   EndIf

    ; Loop until the user exits.
    While 1
        Switch GUIGetMsg()
        Case $idOkButton
            $vPlan = GUICtrlRead($idComboBox)

            If Not($vPlan == "Choose Insurance Plan") Then
;~              Search $aResultArray for all entries with Plan Name
               Global $aPlanSearch = _ArrayFindAll($aResultArray, $vPlan, Default, Default, Default, Default, 0)
               If IsArray($aPlanSearch) Then
                  $vRunningTotal = 0
                  $jMax = UBound($aPlanSearch)
                  For $j = 0 to $jMax -1;
                     $vIsolatedRxDate = $aResultArray[$aPlanSearch[$j]][1]
                     $vIsolatedRxNum = $aResultArray[$aPlanSearch[$j]][2]
                     $vIsolatedRxPaid = $aResultArray[$aPlanSearch[$j]][3]
;~                   MsgBox($MB_OK,"",$vIsolatedRxDate & "|" & $vIsolatedRxNum & "|" & $vIsolatedRxPaid,3)
                     $vRunningTotal += $vIsolatedRxPaid
                  Next
               EndIf
               GUICtrlSetData($vNoc,UBound($aPlanSearch))
               GUICtrlSetData($vTotalPayAmt, $vRunningTotal)
               Global $vMaxRange = UBound($aPlanSearch)
               $vMaxRange -= 1
               Local $vMinDateUnformatted = _ArrayMin($aResultArray, 1, $aPlanSearch[0], $aPlanSearch[$vMaxRange], 1)
               Local $vMinDateYear = StringLeft($vMinDateUnformatted,4)
               $vMinDateUnformatted = StringTrimLeft($vMinDateUnformatted,4) & $vMinDateYear
               GUICtrlSetData($vMinDate, $vMinDateUnformatted)
               Local $vMaxDateUnformatted = _ArrayMax($aResultArray, 1, $aPlanSearch[0], $aPlanSearch[$vMaxRange], 1)
               Local $vMaxDateYear = StringLeft($vMaxDateUnformatted,4)
               $vMaxDateUnformatted = StringTrimLeft($vMaxDateUnformatted,4) & $vMaxDateYear
               GUICtrlSetData($vMaxDate, $vMaxDateUnformatted)
               Global $vPaymentDate = GUICtrlRead($vPaymentDateInput)
               Global $vEpicDate = GUICtrlRead($vEpicDateInput)
               If ($vPaymentDate == "mm/dd/yyyy") OR ($vEpicDate == "mm/dd/yyyy") Then
                  MsgBox($MB_ICONERROR,"Invalid Selection","Date(s) Entered Invalid.")
               Else
                  GUICtrlSetState($idContinueButton, $GUI_ENABLE)
               EndIf
            Else
               MsgBox($MB_ICONERROR,"Invalid Selection","No Insurance Plan Selected.")
            EndIf


         Case $idOpenButton
            OpenFile()
            ExitLoop

         Case $idContinueButton
            Global $vContinuePaidTotal = 0
            $vContinuePaidTotal = Number($vContinuePaidTotal)

            If WinExists("Reconcile Payment") Then
               Local $vContinueMin = $aPlanSearch[0]
               Local $vContinueMax = $aPlanSearch[$vMaxRange]
               Global $vReconciledAmt
;~              _ArrayDisplay($aResultArray,"Result Array", $vContinueMin & ":" & $vContinueMax)
               For $i = $vContinueMin to $vContinueMax
;~                 Send Rx Number to Reconcile Payment Screen
                  ControlFocus("Reconcile Payment","",$pEdit & $vPioneerClass & "; INSTANCE:1]")
                  ControlSend("Reconcile Payment","",$pEdit & $vPioneerClass & "; INSTANCE:1]",$aResultArray[$i][2])
                  ControlFocus("Reconcile Payment","",$pButton & $vPioneerClass & "; INSTANCE:1]")
                  ControlClick("Reconcile Payment","",$pButton & $vPioneerClass & "; INSTANCE:1]")

                  Local $vContineRxNum = $aResultArray[$i][2]
                  Local $vContinueRxDate = $aResultArray[$i][1]
                  Local $vContinueRxPaidAmt = Number($aResultArray[$i][3])
                  $vContinueRxPaidAmt = StringFormat($vContinueRxPaidAmt, "%.2f")
                  Local $vDifference = 0

                  $vReconciledAmt = ControlGetText("Reconcile Payment","","[CLASS:WindowsForms10.STATIC.app." & $vPioneerClass & "; INSTANCE:36]")
                  $vReconciledAmt = Number(StringTrimLeft($vReconciledAmt, 1))
                  $vReconciledAmt = StringFormat($vReconciledAmt, "%.2f")
                  $vContinuePaidTotal = StringFormat($vContinuePaidTotal,"%.2f")
                  $vContinueRxPaidAmt = StringFormat($vContinueRxPaidAmt, "%.2f")
                  $vContinuePaidTotal = $vContinuePaidTotal + $vContinueRxPaidAmt
                  $vContinuePaidTotal = StringFormat($vContinuePaidTotal, "%.2f")
                  $vDifference = $vContinuePaidTotal - $vReconciledAmt
                  $vDifference = StringFormat($vDifference, "%.2f")

                  MsgBox($MB_OK,"",$vReconciledAmt & @CRLF & $vContinuePaidTotal & @CRLF & @CRLF & "Difference: " & $vDifference)

                  If $vReconciledAmt = $vContinuePaidTotal Then
                     MsgBox($MB_OK,"","Amounts Match.")
                  Else
                     MsgBox($MB_OK,"","Amounts Do Not Match.")
                     $vContinuePaidTotal = StringFormat($vContinuePaidTotal, "%.2f")
                     $vDifference = StringFormat($vDifference, "%.2f")
                     $vContinuePaidTotal = $vContinuePaidTotal - $vDifference
                     $vContinuePaidTotal = StringFormat($vContinuePaidTotal, "%.2f")
                     $vDifference = StringFormat($vDifference, "%.2f")
                  EndIf





               Next
            Else
               MsgBox($MB_ICONERROR,"Invalid Selection","Reconcile Payment Screen not found.")
            EndIf


         Case $idCancelButton, $GUI_EVENT_CLOSE
            ExitLoop
        EndSwitch
    WEnd



EndFunc

;~ Open File
Func OpenFile()
   Local $sFileOpenDialog = FileOpenDialog("Select Payment Data to Import","C:\Users\Owner\Downloads\","Payment Files (*.xls;*.tab)", $FD_FILEMUSTEXIST)
   If @error Then
      MsgBox($MB_SYSTEMMODAL,"","No file was selected.")
   Else
      $vTabFile = $sFileOpenDialog
   EndIf
   CreatePaymentArray()
   CreateWindow()
EndFunc

;~ Set up Payments in Pioneer - UNFINISHED
Func SetupPioneer()
   If WinExists("PioneerRx Quinlans Pharmacy") Then
      WinActivate("PioneerRx Quinlans Pharmacy")
      Send("{ESC 3}")
      Send("!{S}")
      Send("{P 2}")
      WinWait("Save Rx?","",1)

      If WinExists("Save Rx?") Then
         Send("{N}")
         Sleep(200)
         WinActivate("PioneerRx Quinlans Pharmacy")
         ControlClick("PioneerRx Quinlans Pharmacy","", $pButton & $vPioneerClass & "; INSTANCE:8]")
      Else
         WinActivate("PioneerRx Quinlans Pharmacy")
      EndIf

      ControlClick("PioneerRx Quinlans Pharmacy","", $pButton & $vPioneerClass & "; INSTANCE:8]")
      WinWait("Action Menu")
      ControlClick("Action Menu","", $pButton & $vPioneerClass & "; INSTANCE:5]")
      WinWait("Add Third Party Payment")
      ControlSend("Add Third Party Payment", "", $pEdit & $vPioneerClass & "; INSTANCE:4]", StringLeft($vPlan,5))
      Send("{ENTER 2}")
      Sleep(100)
      ControlClick("Add Third Party Payment","","[CLASS:WindowsForms10.COMBOBOX.app." & $vPioneerClass & "; INSTANCE:1]")
      Send("{DOWN}")
      ControlFocus("Add Third Party Payment","",$pEdit & $vPioneerClass & "; INSTANCE:3]")
      ControlSend("Add Third Party Payment","",$pEdit & $vPioneerClass & "; INSTANCE:3]", $vPaymentDate)
      ControlFocus("Add Third Party Payment","",$pEdit & $vPioneerClass & "; INSTANCE:2]")
      ControlSend("Add Third Party Payment","",$pEdit & $vPioneerClass & "; INSTANCE:2]", "EPIC " & $vEpicDate & " Automated")
;~    ControlClick("Add Third Party Payment","",$pButton & $vPioneerClass & "; INSTANCE:4]")





   Else
      MsgBox ($MB_ICONERROR,"Window Test", "PioneerRx Quinlans Pharmacy Window Does Not Exist")
   EndIf

EndFunc


CreatePaymentArray()

CreateWindow()

 

Edited by asakust
Solved

Share this post


Link to post
Share on other sites
Melba23

asakust,

Go and look up "floating point arithmetic" - or search the forum because it has been discussed I do not know how many times.  And before you ask, this is NOT an Autoit problem - it affects all computers regardless of language unless they use special arithmetic routines.

M23

  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
asakust

Go and look up "floating point arithmetic" - or search the forum because it has been discussed I do not know how many times.

​Good deal, I'll look into it. Thanks for giving me the name of something to look for, I had no idea where to even start - I tried searching for "extra decimal places," "math extra decimals," and anything else I could think of, but since I had no idea what to look for, I couldn't find anything to start from. I'll update when I get somewhere. 

 

Thanks, M!

Edited by asakust

Share this post


Link to post
Share on other sites
asakust

Actually, I still have issues with this... I'm trying to use StringFormat to force the numbers to truncate anyway, and it's still coming out with the extra decimals. Code snippet below.

$vContinuePaidTotal = StringFormat($vContinuePaidTotal, "%.2f")
    $vDifference = StringFormat($vDifference, "%.2f")
    $vContinuePaidTotal = $vContinuePaidTotal - $vDifference
    $vContinuePaidTotal = StringFormat($vContinuePaidTotal, "%.2f")

I'm assuming I'm using the StringFormat correctly, but even after repeatedly trying to force it into 2 decimal places (yes, I'm working with money) the $vContinuePaidTotal variable always returns with added decimal places. I have tried the same thing I'm doing here with Round(), am I missing something? Should I be formatting the string and/or rounding it as I'm trying to return the value?

MsgBox($MB_OK,"Total Amount","ContinuePaidTotal = " & Round($vContinuePaidTotal,2))

;~ OR

MsgBox($MB_OK,"Total Amount","ContinuePaidTotal = " & StringFormat($vContinuePaidTotal, "%.2f")

Something like this?

I understand the floating point issue is not one with AutoIt, but I'm just confused as to where I'm going wrong in attempting to format the resulting values.

Share this post


Link to post
Share on other sites
Melba23

asakust,

I'm assuming I'm using the StringFormat correctly

Check the order of the parameters for StringFormat - you might find it works better if you get them the right way round.

But you might get .99999999999 returned and so I would not recommend that method.

If you are working with cash, why not convert everything to cents/pence/lowest and do all the maths on integers, reconverting at the end?

M23

Edited by Melba23
Wrong button too soon
  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
asakust

Melba - 

I got stuck in the reference with this PrintFormat Function. Thanks for that.

PrintFormat($iInt_Unsigned, "%.2f", "floating point with 2 digits after decimal point", 1) ; 43951789.00

The only reason I haven't switched everything into cents and reconverted is that... Well, I figured it would be more difficult and take more time - but with the issues I'm having on the floating-point nonsense, that may be the easier route.

 

Thanks again, I'll try it again later on and update you!

Share this post


Link to post
Share on other sites
asakust

Melba -

You're a genius, and I am a syntax fool. Thank you very much.

Share this post


Link to post
Share on other sites
Melba23

asakust,

Glad I could help.

M23

  • Like 1

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • tecc
      By tecc
      As explained elsewhere the idea is to highlight a phone number in an e-mail, docx or PDF and to press Capslock to get get it formatted properly and pasted into our softphone client and dial the number. Problem here is twofold:

      - the number gets pasted and dialing starts but then interrupts (as if ESC were pressed) and then immediately dialing starts again and the call goes out
      - once the number has been dialed successfully and the clipboard emptied, another press on Capslockon another highlighted phone number should do the same.
        What happens though is that this new number does get pasted but not formatted. Any idea what's wrong with my loop/function?
       
      #include <Clipboard.au3> While ProcessExists("3CXWin8Phone.exe") HotKeySet("{CAPSLOCK}", "GetNumber") WEnd Func GetNumber() Opt("SendCapslockMode",0) Send("{CAPSLOCK OFF}") Send("^c") $n = ClipGet() $n = StringRegExpReplace("0" & $n , _ '^(?:0\+49|0\d|(0)\+(\d\d))(?:\h*\(0\))?\D*0?(\d+)\D*(\d+)\D*', "0$1$2$3$4") ClipPut ($n) WinActivate("3CX - ") WinWaitActive("3CX - ") Send("^v") Sleep(500) Send("{ENTER}") ClipPut ("") EndFunc Exit  
    • diego_bihalva
      By diego_bihalva
      Hi guys!
       I'm looking for your help  
      The problem is: when I got the iFrame object at the page's source code, the return was "ok", but when I tryed to pick the iFrame's source code, the result is "nothing". Even use the _IETagNameAllGetCollection and others similar functions the result is the same: "nothing"
       
      Au3 Script:
      ... #include<IE.au3> Local $oIE = ... Local $oFrame = _IEGetObjById($oIE, "_wicket_window_3") ConsoleWrite(IsObj($oFrame) & @CRLF) ;RESULT = 1 ConsoleWrite($oFrame.outerHtml & @CRLF) ;RESULT = NOTHING Principal Page's source code:
      Note: the form tag doesn't have a ID or Name, but if I look for iFrame from $oIE source code, It's "ok". <html> ... <body> ... DIVs, INPUTS, and so forth ... <div class="wicket-modal" id="_wicket_window_0" role="dialog" aria-labelledby="Portal da Portabilidade de Crédito" style="left: 283px; top: 273.5px; width: 800px; visibility: visible; position: absolute;"> ... DIVs, INPUTS, and so forth ... <form style="border-width: 0px; margin: 0px; padding: 0px; position: static; background-color: transparent;"> ... DIVs, INPUTS, and so forth ... <iframe class="wicket_modal" id="_wicket_window_3" src="" frameborder="0" style="height: 620px;" allowtransparency="false"></iframe> ... DIVs, INPUTS, and so forth ... </form> ... DIVs, INPUTS, and so forth ... </div> ... DIVs, INPUTS, and so forth ... </body> </html>  
      iFrame's "_wicket_window_3" source code, viewed by IE Element Inspector (I WANNA GET THIS):
      <html xmlns="http://www.w3.org/1999/xhtml"><head><script src="/static/js/jquery-1.8.3.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery-ver-1408133796000.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-1408133796000.js" type="text/javascript"></script> <script src="../../wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1408133800000.js" type="text/javascript"></script> <link href="../../wicket/resource/org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal-ver-1408133800000.css" rel="stylesheet" type="text/css"> <script id="wicket-ajax-base-url" type="text/javascript"> /*<![CDATA[*/ Wicket.Ajax.baseUrl="ctc/portabilidadeContaSalario/detalhar?3"; /*]]>*/ </script> <script src="../../../../static/js/jquery-ui/jquery-ui.min.js" type="text/javascript"></script> <link href="../../../../static/js/jquery-ui/jquery-ui.min.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="robots" content="noindex"> <link href="../../static/css/ctc.css" rel="stylesheet" type="text/css"> <link href="../../static/css/ctc_custom.css" rel="stylesheet" type="text/css"> <script src="../../static/js/deployJava.js" charset="utf-8"></script></head><body><object width="0" height="0" id="deployJavaPlugin" classid="clsid:CAFEEFAC-DEC7-0000-0001-ABCDEFFEDCBA" data="data:application/x-oleobject;base64,rO/+ysfeAAAAAavN7/7cugAKAAAAAAAAAAAAAA=="></object> <script src="../../static/js/jquery-ctc.js" charset="utf-8"></script> <script src="../../static/js/signUtils.js" charset="utf-8"></script> <script src="../../static/js/json3.in.js" charset="utf-8"></script> <script src="../../static/js/menu2.js" charset="utf-8"></script> <script src="../../static/js/componentTicket.js" charset="utf-8"></script> <script src="../../static/js/appletScript.js" charset="utf-8"></script> <script src="../../static/js/biginteger/bigInteger.js" charset="utf-8"></script> <link href="../../favicon.ico" rel="icon" type="image/ico"> <script id="jquery.blockui" src="../../static/js/jquery.blockUI.js" type="text/javascript" charset="utf-8"></script> <script id="jquery.maskedinput" src="../../static/js/jquery.maskedinput-1.3.1.min.js" type="text/javascript" charset="utf-8"></script> <script id="jquery.priceformat" src="../../static/js/jquery.price_format.2.0.js" type="text/javascript" charset="utf-8"></script> <script src="/csrfTokenS" type="text/javascript"></script> <script type="text/javascript"> /*<![CDATA[*/ Wicket.Event.add(window, "domready", function(event) { Wicket.Ajax.ajax({"sc":"content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divTitle:btnRecolheAbba","c":"btnRecolheAbba4e","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm-divTitle-btnRecolheAbba","e":"click","f":"dataForm4d","m":"POST"});; $(document).ready(function(){if(isChrome()) { $('#contentChild').css({ 'border-top':'solid 1px white'});}window.scrollTo(0,0);; $("#cpfCli4f").mask("999.999.999-99",{}); $("#cpfCli4f").mask("999.999.999-99",{}); $("#TelCli50").mask("(99)99999999?9",{});}); Wicket.Ajax.ajax({"sc":"content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:containnerButtons:containerAcionsButtons:1:actionButton","c":"actionButton51","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm-containnerButtons-containerAcionsButtons-1-actionButton","e":"click","f":"dataForm4d","m":"POST"});; Wicket.Ajax.ajax({"c":"dataForm4d","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm-RightContent-ContentDiv-wizardPortabilidade-divTab-tabsWizard-0-tabWizard-divTabContent-divContent-tabContent-dataForm","e":"submit","f":"dataForm4d","m":"POST"});; Wicket.Ajax.ajax({"c":"contentForm52","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm-content-contentChild-contentForm","e":"submit","f":"contentForm52","m":"POST"});; Wicket.Ajax.ajax({"c":"layoutForm","u":"./detalhar?3-1.IBehaviorListener.0-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm","e":"submit","f":"layoutForm","m":"POST"});; ;}); /*]]>*/ </script> <title>Portal da Portabilidade de Crédito</title> <div id="rootContent"> <div id="main" style="margin: 0px;"> <div id="corpo"> <div id="blocoDireito" style="padding: 0px; top: 0px;"> <form id="layoutForm" action="./detalhar?3-1.IFormSubmitListener-rootContent-BaseMainContent-BaseBlocoDireito-layoutForm&amp;SECURITYTOKEN=HIMY-BPSD-5C7F-20H2-XERE-E38O-YKYZ-VVB7-H53V-M9FA-B4CB-P3E6-557U-T5J7-IB1Q-N256" method="post" defaultform="true"><div style="left: -100px; top: -100px; width: 0px; height: 0px; overflow: hidden; position: absolute;"><input name="layoutForm_hf_0" id="layoutForm_hf_0" type="hidden"></div> <div id="messagePanel" style="display: none;"></div> <div id="pagina"> <div id="contentChild"> <div id="contentForm52" defaultform="true"> <div id="right" style="margin: 0px;"> <div id="conteudo" style="margin: 0px;"> <span><h3 style="margin: 0px 0px 10px; padding: 0px;"> <font color="gray">NU Portabilidade: </font>201807110000056998252 <br><font color="gray">Situação: </font>Aceite Compulsório por falta de resposta do Participante Folha de Pagamento <br><font color="gray">Data: </font>17/07/2018 <br><font color="gray">Motivo: </font>Aceite Compulsório por falta de resposta do Participante Folha de Pagamento</h3></span> <span> <div class="passos" id="divBreadCrumb53"> <div class="passo ativo"> <div class="passo numero ativo"><span>1</span></div> <div class="passoTexto"><span>Cliente</span></div> <br class="clr"> <div class="passoStatus"><span>Você está aqui</span></div> </div> <div class="passo inativo"> <div class="passo numero inativo"><span>2</span></div> <div class="passoTexto"><span>Participante</span></div> <br class="clr"> <div class="passoStatus"><span>Você está aqui</span></div> </div> </div> <div id="divTab54"> <div class="passosConteudo"> <div> <div id="AbaCliente_0" ticket="Identificação do cliente" containnerpath="AbaCliente_0" containnerid="AbaCliente_0"> <div id="dataForm4d" defaultform="true"> <table style="width: 726px;" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td class="destaqueTb" style="width: 100%;"> <span class="tituloTb">Identificação do cliente</span> <span class="imgTb"><input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divTitle:btnRecolheAbba" class="btRecolher" id="btnRecolheAbba4e" type="button"></span> </td> </tr> <tr> <td class="blocoDados2 itemVisivel" id="divContent_tabContent"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody><tr> <td> <div class="dados"> <span>CPF *</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:cpfCli" disabled="disabled" id="cpfCli4f" style="width: 210px;" maxlength="15" value="01234567890" ticket="CPF" mask="CPF" unmask="true" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td colspan="2"> <div class="dados"> <span>Nome *</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:NomCli" disabled="disabled" id="NomCli55" style="width: 550px;" type="text" maxlength="80" value="JOAO DA SILVA" ticket="Nome" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td> <div class="dados"> <span>Telefone</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:TelCli" disabled="disabled" id="TelCli50" style="width: 210px;" type="text" value="" ticket="Telefone" mask="TELEFONE_DDD_XSD" unmask="false" ticketpath="AbaCliente_0"> </div> </td> <td> <div class="dados"> <span>Email</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:EmailCli" disabled="disabled" id="EmailCli56" style="width: 300px;" type="text" maxlength="50" value="" ticket="Email" ticketpath="AbaCliente_0"> </div> </td> </tr> <tr> <td> <div class="dados"> <span>Código Autenticação do Beneficiário</span><br> <input name="content:contentChild:contentForm:RightContent:ContentDiv:wizardPortabilidade:divTab:tabsWizard:0:tabWizard:divTabContent:divContent:tabContent:dataForm:divContent:codigoAutenticacaoBeneficiario" disabled="disabled" id="codigoAutenticacaoBeneficiario57" style="width: 210px;" type="text" maxlength="100" value="" ticket="Código Autenticação do Beneficiário" ticketpath="AbaCliente_0"> </div> </td> </tr> </tbody></table> </td> </tr> </tbody></table> <div class="botoes"> <input name="ACTION" class="botao botaoPadrao" id="actionButton51" type="submit" value="Próximo"> </div> </div> </div> </div> </div> </div> <div class="botoes" id="divBotoes58" style="margin: -30px 0px 4px;"> </div> </span> <span></span> </div> </div> </div> </div> <div id="popUpWindow59" style="display: none;"> <div id="content5a" style="display: none;"></div> </div> <div id="popupConfirmacao5b" style="display: none;"> <div id="content5c" style="display: none;"></div> </div> </div> <input name="SECURITYTOKEN" type="hidden" value="XXXX"></form> <br class="clr"> </div> </div> </div> <script type="text/javascript"> /*<![CDATA[*/ $(document).ready(function() { setInterval(function() { var data = new Date(); var options = { year: "numeric", month: "numeric", day: "numeric" }; $('#dataHora').html(data.toLocaleTimeString("pt-BR", options)); }, 1000); }); /*]]>*/ </script> </div> <div style="display: none;"> <h1 id="blockUIView"><img width="40" height="40" style="top: 15px; position: relative;" src="../../static/imagens/big-roller.gif"><span id="messageWait">Por favor, aguarde...</span></h1> </div> <span id="confirmationDialog5d" style="display: none;"> </span> <script>var attributes = {"id":"ecpfApplet","codebase":"*","height":"1","width":"1","code":"br.org.cip.applet.EcpfApplet"}; var parameters = {"jnlp_href":"/jnlp/generator/ecpf.jnlp"}; var version = "1.6"; var applet = deployJava.runApplet(attributes,parameters,version);</script><applet width="1" height="1" id="ecpfApplet" codebase="*" code="br.org.cip.applet.EcpfApplet"><PARAM NAME="_cx" VALUE="26"><PARAM NAME="_cy" VALUE="26"> <param name="jnlp_href" value="/jnlp/generator/ecpf.jnlp"><param name="codebase_lookup" value="false"> </applet> <span id="asynchronousComponent5e" style="display: none;">Asynchronous</span> <script type="text/javascript"> /*<![CDATA[*/ /*** $(document).ready(function() { alert('Completou a renderização'); }); $("#tableRender").ready(function() { alert("Table rendered finish"); }); ****/ $.blockUI.defaults.message = $('#blockUIView'); var assyncProcess = false; $(document).ajaxStart(function() { if(!assyncProcess) $.blockUI(); }).ajaxStop(function() { if(!assyncProcess) $.unblockUI(); }); var fieldNamesError = new Array(); var fieldNamesNoError = new Array(); function fieldsDecorator(fieldError,fieldNoError) { fieldNamesError = fieldError==null?fieldNamesError:fieldError; fieldNamesNoError = fieldNoError==null?fieldNamesNoError:fieldNoError; } function decorator() { $.each(fieldNamesError, function( key, val ) { var selectorID = val;//"[ticket='"+val+"']"; $(selectorID).addClass("inputError"); }); $.each(fieldNamesNoError, function( key, val ) { var selectorID = val;//"[ticket='"+val+"']"; $(selectorID).removeClass("inputError"); }); } function isInternetExplorer() { var ie = navigator.userAgent.toString().toLowerCase().indexOf('msie')>0; return ie; } function isChrome() { var chrome = navigator.userAgent.toString().toLowerCase().indexOf('chrome')>0; return chrome; } function assynchronousProcessing(imageurl,message) { assyncProcess = true; $.unblockUI(); $.blockUI({ message: '<h1><img height="40" width="40" style="position:relative; top:15px;" src="'+imageurl+'" /> '+message+'...</h1>' }); } /*]]>*/ </script> </body></html> Well, I'll appreciate all kind of help.
      Thank you!
    • Cormin
      By Cormin
      I keep writing and deleting my code and I'm having a rough time getting something to work.. I cant for the life of me figure out how to move files from a sub folder into its parent folder. Preferably moving only one file type(*.bps) then deleting the old subfolder and all of its contents. I also want to ignore the folder named "finished"
      Here's my broken code that gets a stack overflow
      Func subfolders() $aFileList = _FileListToArray(@ScriptDir & "\Patches\", "*",2) if IsArray($aFileList) Then While $arraynumber < ($aFileList[0]+1) if StringInStr($aFileList[$arraynumber],"Finished",2) then $arraynumber = $arraynumber + 1 subfolders() Else DirMove(@ScriptDir & "\Patches\" & $aFileList[$arraynumber],@ScriptDir & "\Patches\") subfolders() EndIf WEnd EndIf endFunc $arraynumber = 1 subfolders()  
    • Fin
      By Fin
      Hello...:)
      I have done extensive searches on this issue before posting but have not found a solve. Any help will be greatly appreciated.
      ;I have a valid AutoIt support question and kindly provided the details of my system: ;AutoIt Version: V3.3.14.2 [X32] ;Windows Version: WIN_VISTA [X86] ;Language: English (0409) #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Global $form = GUICreate("O_o", 146, 66, -1, -1) Global $inputNorth = GUICtrlCreateInput("", 12, 24, 53, 21) Global $btnSet = GUICtrlCreateButton("Set Controls", 72, 16, 65, 33, $BS_DEFPUSHBUTTON) GUISetState(@SW_SHOW) HotKeySet("{UP}","_north") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btnSet Global $goNorth= "-" & GUICtrlRead($inputNorth) MsgBox(0,"", "go north: " & $goNorth) Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd ;functions Func _north() $pos=MouseGetPos() MouseMove($pos[0], $pos[1]$goNorth,0) ;-results in syntax error EndFunc As you can see, $goNorth gets its value from $inputNorth
      (the MsgBox shows it works)
      But I cannot get MouseMove() to take $goNorth
      If I use: MouseMove($pos[0], $pos[1]$goNorth,0) --I get a syntax error.
      If I use: MouseMove($pos[0], $pos[1] & $goNorth,0) --I no longer get a syntax error, but that's not right so the function, (likely), moves by zero.
      So is there a way I can get MouseMove() to take a variable for that parameter?
      Thank you in advance should you choose to help!
    • CodingMonkey81
      By CodingMonkey81
      All,
      I'm working on automating the update process for a piece of software that we use at my company. The installer file always contains the version number as a part of the file name (eg InstallFile_9342.msi) and the numbers always change with every update.
      How do I use AutoIt to run the program? I know I can't use a wildcard in place of the numbers when using the "Run" command. 
      I tried 
      Local $aArray = _FileListToArray("C:\path\to\file", "InstallFile_*.msi", 0, 1) Run("$aArray") and I also tried
      Local $bInstall = FileFindFirstFile("InstallFile_*.msi") Run("$bInstall") and neither worked. 
      Can someone please point me in the right direction? I've done some searching on the forum and haven't found anyone in a similar situation before.
      Thanks!
×