I am adding labour charge to total paid amount using :
#include <IE.au3> #include <Array.au3> $oIE = _IEAttach ("Shop") $oTable = _IETableGetCollection ($oIE, 1) $aTableData3 = _IETableWriteToArray ($oTable) Local $sitem1 = $aTableData3 Local $sitem2 = $aTableData3 Local $lcharge = "10" ;add manualy using inputbox, becuase not generating online Local $atotPric = "Payable Total Price " Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If $oTd.Innertext = $atotPric Then $iatotPric = $oTd.NextElementSibling.innertext MsgBox (0, "2", $iatotPric) EndIf Next $irCtotal = StringFormat("%.2f", $sitem1 + $sitem2 + $lcharge) $crTotp = StringReplace(_IEBodyReadHTML($oIE), $iatotPric, $irCtotal) _IEBodyWriteHTML ($oIE, $crTotp) But, It was also changing Total price, I want to change only Payable Total Price.
Is it possible to Call specific function within a GUI
So I have a script with multiple functions although I don't want to use every function every time.
My Idea is to create a simple GUI which allows me to select what functions I want to use then run the funtions by clicking a button.
I have already made a GUI which allows me to select specific .exe's I would like to run after selection it runs the .exe one by one.
This script is on my work laptops and cannot access it right now.
Who can help me with this?
Then have a boxes which allows me to select the specif Func.(I used GUIChecked and Unchecked in my other script)
Then a button which executes/calls the selected functions
Default keyword for optional parameter is interpreted wrongly.
ConsoleWrite(StringReplace("aa", "a", "b", Default, 1) & @CRLF) StringReplace ( "string", "searchstring/start", "replacestring" [, occurrence = 0 [, casesense = 0]] ) The code above will output ab even thou the default value for the occurrence is 0 (replace all).
Of course using zero instead of Default will work fine.
Good evening everyone
I was trying to insert function header to the functions of my script, but, in the SciTE console, this appears:
Function or struct definition not found, unable to insert header. @Jos Any suggestion?
Thanks in advance.
I have written a UDF for one of my requirement which replaces a single character in string with a sub string/another character.
I am using this for my requirement by calling below function as StrReplace("C:\Software\Autoit\Substr","\","\\") and gives result as C:\\Software\\Autoit\\Substr
Please let me know if this can be improvised or any mistakes to correct.
; Function Name: StrReplace($INPUT_STRING)
; Description: This function is to replace a character with another in a string.
; Parameter(s): $INPUT_STRING - Original String Value
; $STR_2_FIND - Single Character to find the $INPUT_STRING
; $STR_2_REPLACE - Substring/Multiple Characters to replace in place of $STR_2_FIND value
; Requirement(s): Replacing one single Character in a string with multiple Characters
; Return Value(s): success - Output string after replacing a character with required character
; failure - 0
; Author(s): smartkey
Func StrReplace($INPUT_STRING, $STR_2_FIND, $STR_2_REPLACE)
Local $OUTPUT_STRING = ""
If StringLen($INPUT_STRING) > 0 Then
If StringMid($INPUT_STRING,1,1) = $STR_2_FIND Then
$OUTPUT_STRING = $OUTPUT_STRING & $STR_2_REPLACE
$OUTPUT_STRING = StringMid($INPUT_STRING,1,1)
For $i=2 to StringLen($INPUT_STRING)
If StringMid($INPUT_STRING,$i,1) = $STR_2_FIND Then
$OUTPUT_STRING= $OUTPUT_STRING & $STR_2_REPLACE
$OUTPUT_STRING= $OUTPUT_STRING & StringMid($INPUT_STRING,$i,1)