Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/2020 in all areas

  1. I am sure they all be happy to get this answer after 15 years and not being an AutoIt3 solution.
    3 points
  2. How wild is that ass exactly? After all, hex() returns a string - how does the array subscript know what base you want to convert to? you can do this as well: for $x=0 to ubound($b)-1 $b[$x] = ptr($x) next
    1 point
  3. The Unicode range uFB50 to uFDFF is the Arabic Presentation Form A block. UFCB0 to UFCBF displays as "ﲰﲱﲲﲳﲴﲵﲶﲷﲸﲹﲺﲻﲼﲽﲾﲿ" (remember arabic writes rigth to left). There are a number of unassigned codepoints in this block, namely : uFD40 to uFD4F, uFD90 to uFD91, uFDC8 to uFDEF, uFDFE to uFDFF. All of the assigned codepoints in the block range are arabic ligatures having category Lo (letter other), except uFDFC which is the RIAL SIGN currency symbol, category Sc (Symbol currency). No codepoint should compare to the empty string: a codepoint is a codepoint and can't never be equal to "no codepoint", ever. That a codepoint is currently unassigned in today's Unicode version doesn't preclude it being meaningful in the future. And valid codepoints in a string have no right to disappear nor hide themselves from scrutiny. But there is a catch here: AutoIt = comparison is case-insensitive. If you replace the test with the case-sensitive == you get a different, correct result. I don't know how = is coded internally but yes, there is a bug here. Please file a ticket. Here's how to list failing (UCS2) codepoints: For $i = 0 To 0xFFFF If ChrW($i) = '' Then _ ConsoleWrite(ChrW($i) & @TAB & 'Chrw(0x' & Hex($i, 4) & ') = "" ? --> ' & (ChrW($i) = '') & @TAB & @LF) Next
    1 point
  4. Nice work.! Actually kinda cool to watch. One thing for the OP to be careful of since he says: is the encoding of the file when saving in notepad. Source files, as one example, saved in Scite may be encoded UTF-8 with BOM. Which is not the default in Notepad.
    1 point
  5. We are not supposed to write scripts for you, you are supposed to figure it out for yourself and then we help when you get stuck. But this will help you get started, It is taken in part from the Notepad automation tutorial in the Scite help. Copy this example into your Scite editor and then save it, giving it a suitable name. Then just press F5. This example uses itself as the source file and copies it character by character into a Notepad window. Whether you save the file and/or run screen capture is up to you. $iDelay = 10 ; number of milliseconds to pause between characters MsgBox(0, "", "Click ok when ready") Run("notepad.exe") WinWaitActive("Untitled - Notepad") Sleep(5000) ; allow operator time to start the capturing process $hFile = FileOpen(@ScriptDir & "\" & @ScriptName) $x = FileReadLine($hFile) While Not @error For $i = 1 To StringLen($x) Send(StringMid($x, $i, 1)) Sleep($iDelay) Next Send(@CR) $x = FileReadLine($hFile) WEnd FileClose($hFile) WinClose("Untitled - Notepad")
    1 point
  6. for $x=0 to ubound($b)-1 $b[$x] = "0x" & hex($x) next As this simple code gives correct results, so yes, let's store all the "hex" strings preceded by "0x", problem solved Edit: your message did change while I was preparing my answer. Anyway, I'll leave my reply as it was.
    1 point
  7. Hi markyrocks Here is one way to write to it : dim $a[10] dim $b[10] for $x=0 to ubound($b)-1 $b[$x] = $x+1 next $a[0] = $b msgbox('', '', ($a[0])[3]) ;<~~~~~~~this is fine (4) ; ($a[0])[3] = 99 ;<~~~this is broken... _ASA($a[0], 3, 99) msgbox('', '', ($a[0])[3]) ;<~~~~~~~this is fine again (99) ;===== Assign to Sub-Array (ASA) ====== Func _ASA(ByRef $array, $iIndex, $Value) $array[$iIndex] = $Value EndFunc ;==>_ASA
    1 point
  8. I have made a very simple and easy to use script(.bat) which disabled autolock by running the script in a console(cmd) window. If you want to stop the script, the user just need to close the console window. :: SAVE this script as a .bat file and execute it to disable autolock @echo off COLOR 0A mode 69,9 title Stay Awake echo Dim objResult > %temp%\stay_awake.vbs echo Set objShell = WScript.CreateObject("WScript.Shell") >> %temp%\stay_awake.vbs echo Do While True >> %temp%\stay_awake.vbs echo objResult = objShell.sendkeys("{NUMLOCK}{NUMLOCK}") >> %temp%\stay_awake.vbs echo Wscript.Sleep (5000) >> %temp%\stay_awake.vbs echo Loop >> %temp%\stay_awake.vbs echo Start Time: %date% %time% ECHO Please close this window to stop the Stay_Awake Script echo. cscript %temp%\stay_awake.vbs
    0 points
×
×
  • Create New...