5 posts in this topic
I was trying to replace 2 identical characters from a string, but I didn't manage to with StringReplace()...
Does anyone know how to replace two ( i.e. : """" with ";" ) ?
I want to click a link by the element ID through IEGetObjById.
<!DOCTYPE html> <html> <body> <button type="button" id="Random-1-ID" onclick="alert('Hello world!')"></button> </body> </html> I intend to click the button with ID"Random-1-ID". But on every refresh the ID changes to next number like "Random-2-ID" "Random-3-ID"
The code i which i wrote for this function is
#include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("I:\Documents\1. Work\Automation\My codes\Collections\11. Clicking button by Value and ID\button.html") Local $oDiv = _IEGetObjById($oIE, "Random-1-ID") _IEAction($oDiv, "click") _IELoadWait($oIE) So can anyone help me to alter this code like it clicks for every ID in format "Random-%-ID"
I'm having a weird issue with an invisible character (specifically: '?' mark) appearing in my CSV when my script reads it. I've isolated it down to a simple script so I can share it easily.
Has anyone experienced this issue?
How would I be able to detect/remove invisible characters?
For this specific case FileExist would fail. I could do StringReplace or StringRegExp, but what if it's not a '?' mark or a unc path?
Note: I can see the question mark if I open the CSV in notepad, but not in Excel.
$sPath1 = "\\Server\Share\Folder1" ; Copied from Excel 2013 $sPath2 = "\\Server\Share\Folder1" ; Typed out in SciTE ConsoleWrite(@CRLF) ConsoleWrite($sPath1 & @TAB & StringLen($sPath1)) ConsoleWrite(@CRLF) ConsoleWrite($sPath2 & @TAB & StringLen($sPath2)) ConsoleWrite(@CRLF & @CRLF) Screenshot:
Any assistance is appreciated, Thanks!
I am assigning the current time stamp to a variable $strtTime and holding the execution for 5 seconds with Sleep and calculating the current time stamp.
Ideally, the _DateDiff should give 5 seconds as output as i gave the parameter as s.But it is giving zero 0.
Global $startTime = _Date_Time_GetLocalTime() $startTime = _Date_Time_SystemTimeToDateTimeStr($startTime) Sleep(5000) $tCur = _Date_Time_GetLocalTime() $tCur = _Date_Time_SystemTimeToDateTimeStr($tCur) $iDateCalc = _DateDiff('s', $startTime, $tCur) MsgBox(0,"$iDateCalc",$iDateCalc) FileWrite ($QTPfile,CHr(34) & $tCur & CHr(34) & Chr(44) & """" & $iDateCalc & """,")
How a lot of string formatted output to a printer?
1) The first line of Arial font and size 20 and Bold
2) The second line to the fourth line of Tahoma font and size 14
3) Insert two blank lines every 5 row
4) Every 64 rows to add a page break (chr(12) ) and add headers and footers
5) Finally, the formatted string output to a printer(Dot matrix printer)
How to do that?The printer supports ESC / P, ESC / P2, ESC / PK, ESC / PK2, Epson Standard Code for Printer.
Thank you very much!!!