Leaderboard
Popular Content
Showing content with the highest reputation on 08/22/2023 in all areas
-
To pursue on a nice script from @ioa747, try this : #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> Opt("MustDeclareVars", True) HotKeySet("^!{ESC}", _Exit) ; ctrl-alt Esc Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, $WS_EX_TRANSPARENT + $WS_EX_TOPMOST) GUISetBkColor(0xFFEA00) ; * <-- set the color GUISetState() Local $aPos = WinGetPos($hGui) Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aPos[2], $aPos[3], $aPos[2], $aPos[3]) _WinAPI_SetWindowRgn($hGui, $hRgn) Local $iX = $aPos[0], $iY = $aPos[1], $iCount = 0 While Sleep(20) $aPos = MouseGetPos() If $iX <> $aPos[0] Or $iY <> $aPos[1] Then WinMove($hGui, "", $aPos[0] - 50, $aPos[1] - 50) WinSetTrans($hGui, '', 100) $iX = $aPos[0] $iY = $aPos[1] $iCount = 0 Else If $iCount = 10 Then ContinueLoop $iCount += 0.5 ; set speep of vanishing here WinSetTrans($hGui, '', 100 - ($iCount * 10)) EndIf WEnd Func _Exit() Exit EndFunc ;==>_Exit3 points
-
That was a wrong test whether tidy was started by SciTE or not. Should be fixed in the current Beta. Yea.... it does try to get the tabsize from SciTE and uses that to calculate the number of spaces to use. In case SciTE isn't running then tabsize=x needs to be set on either the #Tidy_Parameters= /tabsize=4 (/ts=4 ) or define in tidy.ini the field tabsize=4 under [ProgramSettings] to set it as default. I have made some changes in the last Beta version to make this work properly and also set the default to 4 when not defined. Let me know when you find other issues when ran outside of SciTE as that is not much tested by me!2 points
-
Something like that? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, $WS_EX_TRANSPARENT) GUISetBkColor(0xFFEA00) ; * <-- set the color WinSetTrans($hGui, '', 100) ; * <-- transparency 255 = Solid, 0 = Invisible. GUISetState(@SW_SHOW, $hGui) Local $aPos = WinGetPos($hGui) Local $iWidth = $aPos[2] Local $iHeight = $aPos[3] $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $iWidth, $iHeight, $iWidth, $iHeight) _WinAPI_SetWindowRgn($hGui, $hRgn) ; Loop until the user exits. While 1 $aMpos = MouseGetPos() WinMove($hGui, "", $aMpos[0] - 50, $aMpos[1] - 50) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd2 points
-
Special effect for the mouse cursor.
argumentum reacted to ioa747 for a topic
I also tried it with compilation, (nothing unexpected) but it need the .png files with the correct name ring1.png , ring2.png1 point -
Since I have been programming with Freebasic for several years, I would like to say that Freebasic has many advantages compared to Autoit, such as speed (compiler), inline assembler, multi-platform, open source, etc.. Autoit on the other hand scores in terms of UDFs, i.e. a large part of WinAPI is implemented in UDFs, whereas in FB you have to create everything yourself. Both languages are relatively easy to learn, a BASIC language, have good IDEs and are easy to install (no gigabytes of installation!) BASIC languages are unfortunately outdated and replaced by other languages. I personally work primarily with both languages and I am completely satisfied.1 point
-
Special effect for the mouse cursor.
ioa747 reacted to argumentum for a topic
..I liked the fading and the tray and added right/left click colors and ... I mixed'em all up ( like mashed potatoes but with code ) I see that you wanna compile it. Then the icons are not going to be there as when running as a script. Do change those if you are to use the above script.1 point -
delete/remove the element from DOM tree before you fullfill password <input> element1 point
-
As long there is a consistency and after each line it's an empty line, this should be enough: $sData = FileRead(@ScriptDir & '\example.txt') $sNewData = StringReplace($sData, @CRLF & "children's books" & @CRLF, _ @CRLF & "business & investing" & @CRLF & @CRLF & "children's books" & @CRLF) ConsoleWrite($sNewData & @CRLF)1 point
-
Probably the best approach using just StringReplace() agree I won't disagree with that $sData = FileRead(@ScriptDir & '\example.txt') $sNewData = StringReplace($sData, @CRLF & @CRLF & "children's books" & @CRLF & @CRLF , _ @CRLF & @CRLF & "business & investing" & @CRLF & @CRLF & "children's books" & @CRLF & @CRLF) ConsoleWrite($sNewData & @CRLF)1 point
-
thanks for the tip, that's because I'm struggling with RegEx, I'm trying to make an alternative way, more friendly to a new user so that would be better? $sData = FileRead(@ScriptDir & '\example.txt') $sNewData = StringReplace($sData, "children's books" & @CRLF & @CRLF , "business & investing" & @CRLF & @CRLF & "children's books" & @CRLF & @CRLF) ConsoleWrite($sNewData & @CRLF)1 point
-
Special effect for the mouse cursor.
pixelsearch reacted to Nine for a topic
Another way with pretty much the same original script : #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> Opt("MustDeclareVars", True) HotKeySet("^!{ESC}", _Exit) ; ctrl-alt Esc Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, $WS_EX_TRANSPARENT + $WS_EX_TOPMOST) GUISetBkColor(0xFFEA00) ; * <-- set the color GUISetState() Local $aPos = WinGetPos($hGui) Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aPos[2], $aPos[3], $aPos[2], $aPos[3]) Local $hRgn2 = _WinAPI_CreateRoundRectRgn(5, 5, $aPos[2]-5, $aPos[3]-5, $aPos[2]-5, $aPos[3]-5) _WinAPI_CombineRgn($hRgn, $hRgn, $hRgn2, $RGN_DIFF) _WinAPI_SetWindowRgn($hGui, $hRgn) _WinAPI_DeleteObject($hRgn2) Local $iX = $aPos[0], $iY = $aPos[1], $iCount = 0 While Sleep(20) $aPos = MouseGetPos() If $iX <> $aPos[0] Or $iY <> $aPos[1] Then WinMove($hGui, "", $aPos[0] - 50, $aPos[1] - 50) WinSetTrans($hGui, '', 100) $iX = $aPos[0] $iY = $aPos[1] $iCount = 0 Else If $iCount = 10 Then ContinueLoop $iCount += 0.5 ; set speep of vanishing here WinSetTrans($hGui, '', 100 - ($iCount * 10)) EndIf WEnd Func _Exit() Exit EndFunc ;==>_Exit1 point -
my modified version: Example(0) Example(1) Example(0.2) Example(10234.2) Example(300200100.45) Func Example($i) Local $sTest = Round($i, 2) ConsoleWrite("! $sTest = " & $sTest & @CRLF) ConsoleWrite("+ $sTest = " & _RoundAsCurrency($sTest, 2, ',', '-', '.') & @CRLF) EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _RoundAsCurrency ; Description ...: Awesome solver for Tweaking Round() to return with trailing zeros like a currency. ; Syntax ........: _RoundAsCurrency($s_Number[, $i_Round = 0[, $s_DecimalSeparator = "[, $s_NegativeMark = "-"[, $s_ThousandsSeparator = "."]]]]) ; Parameters ....: $s_Number - a string value that represents number/value ; $i_Round - [optional] an integer value. Default is 0. ; $s_DecimalSeparator - [optional] a string value. Default is '. ; $s_NegativeMark - [optional] a string value. Default is '-'. ; $s_ThousandsSeparator- [optional] a string value. Default is '.'. ; Return values .: $s_Number formated like a currency ; Author ........: lpduy ; Modified ......: mLipok ; Remarks .......: ; Related .......: ; Link ..........: https://www.autoitscript.com/forum/topic/139260-autoit-snippets/page/18/#comment-1400209 ; Link ..........: https://www.autoitscript.com/forum/topic/139260-autoit-snippets/?do=findComment&comment=1523211 ; Example .......: No ; =============================================================================================================================== Func _RoundAsCurrency($s_Number, $i_Round = 0, $s_DecimalSeparator = ",", $s_NegativeMark = "-", $s_ThousandsSeparator = ".") ;~ If $s_Number = 0 Then Return "0" Local $sign = "" $s_Number = StringReplace($s_Number, $s_DecimalSeparator, "") If StringInStr($s_Number, $s_NegativeMark) Then $s_Number = StringReplace($s_Number, $s_NegativeMark, "") $sign = "-" EndIf Local $split = StringSplit($s_Number, $s_ThousandsSeparator, 2) Local $int = $split[0] Local $tail = "" If UBound($split) >= 2 Then $tail = $split[1] Else Local $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") $int = StringRight($int, StringLen($int) - 1) If $i_Round = 0 Then Return $sign & $int Else Return $sign & $int & "," & StringFormat("%0" & $i_Round & "s", "0") EndIf ElseIf $mod = 2 Or $mod = 1 Then Local $int1 = StringLeft($int, $mod) Local $int2 = StringRight($int, StringLen($int) - $mod) If $i_Round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringFormat("%0" & $i_Round & "s", "0") EndIf EndIf EndIf $tail = Round("0." & $tail, $i_Round) If $tail = 1 Then $int = $int + 1 $tail = StringFormat("%0" & $i_Round & "s", "0") $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") If $i_Round = 0 Then Return $sign & StringRight($int, StringLen($int) - 1) Else Return $sign & StringRight($int, StringLen($int) - 1) & "," & StringMid(StringFormat("%f", $tail), 3, $i_Round) EndIf ElseIf $mod = 2 Or $mod = 1 Then $int1 = StringLeft($int, $mod) $int2 = StringRight($int, StringLen($int) - $mod) If $i_Round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringMid(StringFormat("%f", $tail), 3, $i_Round) EndIf EndIf Else $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") $int = StringRight($int, StringLen($int) - 1) If $i_Round = 0 Then Return $sign & $int Else Return $sign & $int & "," & StringMid(StringFormat("%f", $tail), 3, $i_Round) EndIf ElseIf $mod = 2 Or $mod = 1 Then $int1 = StringLeft($int, $mod) $int2 = StringRight($int, StringLen($int) - $mod) If $i_Round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringMid(StringFormat("%f", $tail), 3, $i_Round) EndIf EndIf EndIf EndFunc ;==>_RoundAsCurrency1 point
-
Take a look at : https://www.autoitscript.com/autoit3/docs/libfunctions/_WinAPI_GetSystemPowerStatus.htm In the help you will find an example with which you can test what happens when you remove the power cable. For your information : The Function AdlibRegister checks the current state in intervals (default=250 milliseconds, but can be increased).1 point
-
Special effect for the mouse cursor.
argumentum reacted to Emerogork for a topic
Oop, I found it....1 point -
Special effect for the mouse cursor.
argumentum reacted to Emerogork for a topic
It is very close and it does work the way I want. No, I could not have done this myself. I have no experience with this type of coding.. 50 years of other kinds of coding, yes, but not this. Now that I have a working program, I can explore to develop this further and branch off to design other projects. Although I have use for it myself, I have an instructor or two that have on-line courses. Most of the time, the student has no idea where he recently clicked to go the demonstration. He is not one to remember to use the <ctrl> button to show the rings. I suspect that he is going to ask me if I can get the concentric rings the way that Windows has it. Thank you.1 point -
Special effect for the mouse cursor.
argumentum reacted to Emerogork for a topic
It is very close and it does work the way I want. No, I could not have done this myself. I have no experience with this type of coding.. 50 years of other kinds of coding, yes, but not this. Now that I have a working program, I can explore to develop this further and branch off to design other projects. Thank you.1 point -
Special effect for the mouse cursor.
Musashi reacted to argumentum for a topic
yes PS: ok, here's some code: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> #include <Misc.au3> Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TRANSPARENT)) ; close this GUI by the tray icon GUISetBkColor(0xFFEA00) ; * <-- set the color WinSetTrans($hGui, '', 100) ; * <-- transparency 255 = Solid, 0 = Invisible. GUISetState(@SW_SHOW, $hGui) ; https://www.autoitscript.com/forum/topic/210715-special-effect-for-the-mouse-cursor/?do=findComment&comment=1523181 WinSetOnTop($hGui, "", 1) Local $aPos = WinGetPos($hGui) Local $iWidth = $aPos[2] Local $iHeight = $aPos[3] Global $aMposWas[5], $hTimer = 0, $bItIsPressed = False $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $iWidth, $iHeight, $iWidth, $iHeight) _WinAPI_SetWindowRgn($hGui, $hRgn) ; Loop until the user exits. While 1 $aMpos = MouseGetPos() If $aMposWas[0] <> $aMpos[0] Or $aMposWas[1] <> $aMpos[1] Then If Not $hTimer Then WinSetState($hGui, "", @SW_SHOW) $hTimer = TimerInit() $aMposWas = $aMpos WinMove($hGui, "", $aMpos[0] - 50, $aMpos[1] - 50) EndIf If $hTimer And TimerDiff($hTimer) > 500 Then $hTimer = 0 WinSetState($hGui, "", @SW_HIDE) EndIf ; on click, do something. This changes the color. If Not $bItIsPressed And _IsPressed("01") Then GUISetBkColor(0xFF33AA) AdlibRegister(SetColorBackToNormal, 250) $bItIsPressed = True $hTimer = TimerInit() EndIf If $bItIsPressed And Not _IsPressed("01") Then $bItIsPressed = False EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop EndSwitch WEnd Func SetColorBackToNormal() $hTimer = TimerInit() ; ..to extend the time it shows the circle. AdlibUnRegister(SetColorBackToNormal) GUISetBkColor(0xFFEA00) ; * <-- set the color EndFunc ...but you could have done this changes yourself 😕 Edit2: hid the taskbar icon. ( Also, I like Nine's dimming effect. Looks nice. ) Edit3: added to change the color of the circle on click.1 point -
Still clear as mud. What app is doing it ? Record it and post it here.1 point
-
How to use StringRegExp or StringRegExpReplace To Hex File / Code?
HezzelQuartz reacted to Andreik for a topic
We don't know what's in your lib.so and what's the best approach in this particular case. You can't open the file for binary read (16) and then in your regex pattern to assume you have spaces between bytes. Is your data really binary? If it's not binary and your lib.so contains something like this: Assuming that you want to replace 00000000 group, you can use this code HotKeySet('{ESC}', 'Quit') HotKeySet('{F1}', 'StandbyTrue') Global $sBefore = 'FF4301D1 FE0B00F9 F85F02A9 F65703A9 F44F04A9 58D03BD5 F30308AA 081740F9' Global $sAfter = 'F50300AA E80700F9 43FEFF97 9F060071 F603002A AB000054' Global $hFile, $Standby = False While 1 While $Standby = True ; Open the file for binary read and load content $hFile = FileOpen(@ScriptDir & '\lib.so', 0) $dRead = FileRead($hFile) FileClose($hFile) ; Do your processing stuff $dNew = StringRegExpReplace($dRead, $sBefore & ' [[:xdigit:]]{8} ' & $sAfter, $sBefore & ' 11223344 ' & $sAfter) ; Open the file for binary write and save content $hFile = FileOpen(@ScriptDir & '\newlib.so', 2) FileWrite($hFile, $dNew) FileClose($hFile) $Standby = False WEnd Sleep(10) WEnd Func Quit() Exit EndFunc Func StandbyTrue() $Standby = True EndFunc and newlib.so will look like that If your data is binary and your lib.so looks like that or like this in binary format Assuming that you want to replace the 12121212 group, you can use this code HotKeySet('{ESC}', 'Quit') HotKeySet('{F1}', 'StandbyTrue') Global $sBefore = 'FF4301D1FE0B00F9F85F02A9F65703A9F44F04A958D03BD5F30308AA081740F9' Global $sAfter = 'F50300AAE80700F943FEFF979F060071F603002AAB000054' Global $hFile, $Standby = False While 1 While $Standby = True ; Open the file for binary read and load content $hFile = FileOpen(@ScriptDir & '\lib.so', 16) $dRead = FileRead($hFile) FileClose($hFile) ; Do your processing stuff $dNew = StringRegExpReplace($dRead, '0x' & $sBefore & '[[:xdigit:]]{8}' & $sAfter, '0x' & $sBefore & '11223344' & $sAfter) ; Open the file for binary write and save content $hFile = FileOpen(@ScriptDir & '\newlib.so', 18) FileWrite($hFile, $dNew) FileClose($hFile) $Standby = False WEnd Sleep(10) WEnd Func Quit() Exit EndFunc Func StandbyTrue() $Standby = True EndFunc and newlib.so will look like that or like this in binary format Now you have an example of both cases so you should be able to figure it out. Just don't mix binary with plain text.1 point -
Latest update just released. See below for change log.1 point
-
A fure AutoIt function to display number with group! It good for me. and not sure for any one, please test before use Func num($num, $round = 0, $group = ",", $negative = "-", $decimal = ".") If $num = 0 Then Return "0" Local $sign = "" $num = StringReplace($num, $group, "") If StringInStr($num, $negative) Then $num = StringReplace($num, $negative, "") $sign = "-" EndIf $split = StringSplit($num, $decimal, 2) $int = $split[0] $tail = "" If UBound($split) >= 2 Then $tail = $split[1] Else $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") $int = StringRight($int, StringLen($int) - 1) If $round = 0 Then Return $sign & $int Else Return $sign & $int & "," & StringFormat("%0" & $round & "s", "0") EndIf ElseIf $mod = 2 Or $mod = 1 Then $int1 = StringLeft($int, $mod) $int2 = StringRight($int, StringLen($int) - $mod) If $round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringFormat("%0" & $round & "s", "0") EndIf EndIf EndIf $tail = Round("0." & $tail, $round) If $tail = 1 Then $int = $int + 1 $tail = StringFormat("%0" & $round & "s", "0") $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") If $round = 0 Then Return $sign & StringRight($int, StringLen($int) - 1) Else Return $sign & StringRight($int, StringLen($int) - 1) & "," & StringMid(StringFormat("%f", $tail), 3, $round) EndIf ElseIf $mod = 2 Or $mod = 1 Then $int1 = StringLeft($int, $mod) $int2 = StringRight($int, StringLen($int) - $mod) If $round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringMid(StringFormat("%f", $tail), 3, $round) EndIf EndIf Else $mod = Mod(StringLen($int), 3) If $mod = 0 Then $int = StringRegExpReplace($int, "(\d{1,3})", ".$1") $int = StringRight($int, StringLen($int) - 1) If $round = 0 Then Return $sign & $int Else Return $sign & $int & "," & StringMid(StringFormat("%f", $tail), 3, $round) EndIf ElseIf $mod = 2 Or $mod = 1 Then $int1 = StringLeft($int, $mod) $int2 = StringRight($int, StringLen($int) - $mod) If $round = 0 Then Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") Else Return $sign & $int1 & StringRegExpReplace($int2, "(\d{1,3})", ".$1") & "," & StringMid(StringFormat("%f", $tail), 3, $round) EndIf EndIf EndIf EndFunc ;==>num1 point
-
Show location with CTRL Key
argumentum reacted to UEZ for a topic
Here a workaround: ;coded by UEZ build 2014-04-11 #include <GDIPlus.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global Const $iW = 128, $iH = 128, $fCenter = $iW / 2, $iPenSize = 2, $iBGColor = 0xABCDEF Global Const $hGUI = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_LAYERED, $WS_EX_APPWINDOW)) GUISetBkColor($iBGColor, $hGUI) GUISetState(@SW_HIDE, $hGUI) _WinAPI_SetLayeredWindowAttributes($hGUI, $iBGColor) Global $tGDIp = DllStructCreate("ptr Graphics;ptr Bitmap;ptr Context;ptr Pen") $tGDIp.Graphics = _GDIPlus_GraphicsCreateFromHWND($hGUI) $tGDIp.Bitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $tGDIp.Graphics) $tGDIp.Context = _GDIPlus_ImageGetGraphicsContext($tGDIp.Bitmap) _GDIPlus_GraphicsSetSmoothingMode($tGDIp.Context, 2) $tGDIp.Pen = _GDIPlus_PenCreate(0xFF000000, $iPenSize) Global Const $hDll = DllOpen("ntdll.dll"), $iMicroSeconds = 1500 Global $tStruct = DllStructCreate("int64 time;") HotKeySet("{F9}", "ShowLocation") HotKeySet("+{Esc}", "_Exit") ;shift + ESC terminates the script GUISetState(@SW_SHOW, $hGUI) Do Until Not Sleep(1000000) Func _Exit() _GDIPlus_GraphicsDispose($tGDIp.Context) _GDIPlus_GraphicsDispose($tGDIp.Graphics) _GDIPlus_BitmapDispose($tGDIp.Bitmap) _GDIPlus_PenDispose($tGDIp.Pen) GUIDelete() _GDIPlus_Shutdown() DllClose($hDll) Exit EndFunc ;==>_Exit Func ShowLocation() Local $i Local Static $bRunning = False If Not $bRunning Then $bRunning = True WinMove($hGUI, "", MouseGetPos(0) - $fCenter, MouseGetPos(1) - $fCenter) For $i = 0 To ($iW - $iPenSize) / 2 _GDIPlus_GraphicsClear($tGDIp.Context, 0xE0000000 + $iBGColor) _GDIPlus_GraphicsDrawEllipse($tGDIp.Context, $i, $i, ($iW - $iPenSize) - 2 * $i, ($iW - $iPenSize) - 2 * $i, $tGDIp.Pen) _GDIPlus_GraphicsDrawImageRect($tGDIp.Graphics, $tGDIp.Bitmap, 0, 0, $iW, $iH) $tStruct.time = -1 * ($iMicroSeconds * 10) DllCall($hDll, "dword", "ZwDelayExecution", "int", 0, "struct*", $tStruct) Next _GDIPlus_GraphicsClear($tGDIp.Graphics, 0xFF000000 + $iBGColor) $bRunning = False EndIf EndFunc ;==>ShowLocation Press F9 to show cursor position, Shift+Esc to terminate script. Br, UEZ1 point