Leaderboard
Popular Content
Showing content with the highest reputation on 02/13/2025 in all areas
-
Visual Studio Code Extension currently available and future plans for SciTE?
WildByDesign and one other reacted to ValentinM for a topic
FYI, this feature doesn't come from VSCode itself but from GitHub Copilot, which is an AI helper using GPT-4 that predicts code based on your files (I can't remember if it sticks to the current file or more, but it was originally supposed to only read the current one). It not only predicts the right includes but is also excellent at making loops, filling arrays, etc. However, it can be quite bad at other tasks. It learns from your code and can read your comments, so you can implicitly give it directives. For example: So keep in mind that it could mess with the includes as well. But I use it daily, and it helps me more than it hurts my brain 😀 In the past, you had to be a student, teacher, or pay for access to Copilot, but I can see on their website that it has become free. To use it, you have to install this extension and probably sign in or sign up for a GitHub account. EDIT : Autocompletion is made by pressing TAB.2 points -
Visual Studio Code Extension currently available and future plans for SciTE?
WildByDesign and one other reacted to Jos for a topic
But you could still use the initial version I made with AutoIt3Wrapper, which is implemented in AutoIt3Wrapper and still there: I am not fully up-to-speed on the best way to add own stuff to VSCode but this works fine for me: // filepath: vscode-userdata:/c%3A/Users/.../AppData/Roaming/Code/User/tasks.json { "version": "2.0.0", "tasks": [ { "label": "Add AutoIt Includes", "type": "shell", "command": "${config:autoit.aiPath}\\Autoit3.exe", "args": [ "${config:autoit.aiPath}\\SciTE\\AutoIt3Wrapper\\AutoIt3Wrapper.au3", "/addincludes", "/in", "${file}" ], "group": { "kind": "build", "isDefault": true }, "problemMatcher": [], "detail": "Add missing includes to the AutoIt script" } ] } // keybindings.json [{ "key": "ctrl+shift+z", "command": "workbench.action.tasks.runTask", "args": "Add AutoIt Includes", "when": "editorTextFocus && editorLangId == 'autoit'" }]2 points -
And you could offcourse build a CNN (Convolutional Neural Network)😉 https://www.linkedin.com/posts/andreashorn1_𝗧𝗵𝗶𝘀-𝗶𝘀-𝗵𝗮𝗻𝗱𝘀-𝗱𝗼𝘄𝗻-𝗼𝗻𝗲-ugcPost-7294745573667037184-cCuM?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAA9u1cBwzbrqlJUhZseMBnOqHDoQcSGcpQ1 point
-
A little hard to say as it depends on what font you have bold, italic etc. As far as I can see below is not failing at any digits. This demo script would work for any number of characters as long as you teach the system how it works with the magic strings. There are many ways to speed it up (for example by taking a smaller snapshot within the digit matrix area) Script explanation It scales the bitmap back to 8*8 = 64 bytes and just compares the string (Scaling smaller did not work with initial testing) Local $pBitmap= _GDIPlus_ImageResize($pBitmap1, 8, 8) ;resize image Get the magic numbers local $learnTheDigits=false ;~Use this to learn the 0-9 digit magic values Paste the magic lines (by just comparing the magic numbers as string, speed could be improved by comparing the binary values) if ($stringForDigit='0x00022220020000220200022202002020020020200220002022000020002222') then $num=0 if ($stringForDigit='0x00002000002220000000200000002000000220000002000000020000002222') then $num=1 if ($stringForDigit='0x00022220020000220000002200002200000022000020000022000000222222') then $num=2 if ($stringForDigit='0x00022220020000220000002200002200000022000000002022000020002222') then $num=3 if ($stringForDigit='0x00000220000022000022020002000200020002000222222000002200000022') then $num=4 if ($stringForDigit='0x02222222020000000222220000000020000000200000002022000020002222') then $num=5 if ($stringForDigit='0x00002220002200000200000002222200022222000200002022000020002222') then $num=6 if ($stringForDigit='0x02222222000000220000020000002000000020000020000000200000002000') then $num=7 if ($stringForDigit='0x00022220020000220200002200222200002222000200002022000020002222') then $num=8 if ($stringForDigit='0x00022220020000220200002200222222002222200000002000002200002200') then $num=9 Iterate 6 digits (or 7,8,9) $charHigh=5 ;~ As it starts counting from 0 Do it full speed / turning of the explainer part local $showDigits=false full script #include <GDIPlus.au3> #include <WinAPI.au3> #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <ScreenCapture.au3> dim $bmpData, $w, $h, $s dim $pic[10],$BitmapFilename, $hImage, $Bmp ; Initialize GDI+ library _GDIPlus_Startup() #Region ### START Koda GUI section ### Form= $frmCompare = GUICreate("Another bitmap brute-forcing thread", 1024, 768, 193, 125) for $picId=0 to 9 $BitmapFilename = @UserProfileDir & "\downloads\examples\" & string($picId) & ".png" $pBitmap = _GDIPlus_BitmapCreateFromFile($BitmapFilename) $hImage=_GDIPlus_ImageLoadFromFile($BitmapFilename) $Bmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage) ;~ $hBitmap = _GDIPlus_ImageLoadFromFile($BMPFile) ;~ ConsoleWrite("Bitmap Width: " & _GDIPlus_ImageGetWidth($pBitmap) & @CRLF ) ;~ ConsoleWrite("Bitmap Height: " & _GDIPlus_ImageGetHeight($pBitmap) & @CRLF) $Pic[$picId] = GUICtrlCreatePic("", 32, 24+($picId*60), 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) _WinAPI_DeleteObject(GUICtrlSendMsg($Pic[$picId], $STM_SETIMAGE, $iMAGE_BITMAP, $Bmp)) Next $editBox = GuiCtrlCreateEdit("Analytics box", 250,14,700,750) GUICtrlSetFont($editBox, 8, 100, 0, "Courier New") $Button1 = GUICtrlCreateButton("Analyse", 104, 700, 75, 25, 0) $Button2 = GUICtrlCreateButton("Button2", 104, 730, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $picIdWidth=100 $picIdHeight=100 $picIdX=0 $picIdY=0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _GDIPlus_Shutdown() Exit Case $Button1 analyse() Case $Button2 EndSwitch WEnd func analyse() WinActivate($frmCompare) Local $wPos = WinGetPos($frmCompare) ;~ $aArray[0] = X position $aArray[1] = Y position $aArray[2] = Width $aArray[3] = Height Local $aClientSize = WinGetClientSize($frmCompare) ;~ $aArray[0] = Width of window's client area $aArray[1] = Height of window's client area Local $cLeft= ($wpos[2]-$aClientSize[0])/2 Local $cTop= ($wPos[3]-$aClientSize[1])-2 Local $bytesPerDigit = 1 ;~ could be 1 or 2 or 3 bytes for $picId=0 to 9 Local $cPos = ControlGetPos ( $frmCompare, "", $pic[$picId] ) ;~ $aArray[0] = X position ;~ $aArray[1] = Y position ;~ $aArray[2] = Width ;~ $aArray[3] = Height ;~ ;~ $tLeft, $tRight, $tTop, $tBottom, $color = 0xFF, $PenWidth = 1 ;~ _Screen_DrawRect($wpos[0]+$cLeft+$cPos[0],$wPos[0]+$cPos[0] + $cPos[2], $wPos[1] + $cTop +$cPos[1], $wPos[1] + $cTop + $cPos[1] + $cPos[3]) local $learnTheDigits=false ;~Use this to learn the 0-9 digit magic values local $showDigits=true local $charLow=1, $charHigh=1 if ($learnTheDigits = false) Then $charLow=0 $charHigh=5 EndIf for $charId=$charlow to $charHigh local $charWidth=29 local $leftMatrix=($charId*$charWidth)+$wpos[0]+$cLeft+$cPos[0] local $rightMatrix=$charWidth+($charId*$charWidth)+$wPos[0]+$cLeft+$cPos[0] local $topMatrix= $wPos[1] + $cTop +$cPos[1] + 10 local $bottomMatrix=$wPos[1] + $cTop + $cPos[1] + $cPos[3] -2 -11 local $x, $y Local $bytesForDigit="", $widthMatrix=0, $heightMatrix=0, $stride=0 ;~ Func GetImageDataFromScreen($left, $right, $top, $bottom, byref $BMPDataStart, byref $Width, byRef $Height, byref $Stride, $picIdmgBytes=3) ;~Play with this to take a smaller area GetImageDataFromScreen($leftMatrix, $topMatrix, $rightMatrix, $bottomMatrix, $bytesForDigit, $widthMatrix, $heightMatrix, $stride, $bytesPerDigit) ;~ consolewrite(BinaryLen($bytesForDigit) & " " & stringlen($bytesForDigit) & " " & $widthMatrix & "-" & $heightMatrix & "-" & $stride &@CRLF) local $textoutput= " 0 1 2 3 4 5 6 7 8 " & @CRLF $textoutput&=" 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & @CRLF ;~ strip 0x ;~ consolewrite(stringleft(string($bytesForDigit),20)) local $stringForDigit=string($bytesForDigit) ;~ consolewrite(binarylen($bytesforDigit) & "-" & stringlen($stringforDigit) & "-" & $stringforDigit) if ($learnTheDigits=true) then consolewrite(" if ($stringForDigit='" & $stringforDigit & "') then $num=" & $picId) Else ;~ consolewrite($bytesForDigit & @crlf) ;~ consolewrite($stringForDigit & @CRLF) ;~ local $stringLine1=stringRegExpReplace($stringForDigit,"((0+2A)|(22))","") ;~ local $count1=@extended ;~ $stringline1=stringreplace($stringLine1,"0","") ;~ local $checksum=@extended-$count1 ;~ $stringline1=stringreplace($stringLine1,"222222","") ;~ $checksum+=@extended ;~ $checksum=$checksum+stringlen($stringline1) local $num=" " ;~ if ($checksum=636) or ($checksum=653) then $num=0 ;~ if ($checksum=719) then $num=1 ;~ if ($checksum=674) then $num=2 ;~ if ($checksum=661) then $num=3 ;~ if ($checksum=666) then $num=4 ;~ if ($checksum=650) then $num=5 ;~ if ($checksum=699) or ($checksum=716) then $num=6 ;~ if ($checksum=732) or ($checksum=734) then $num=7 ;~ if ($checksum=655) then $num=8 ;~ if ($checksum=659) or ($checksum=676) then $num=9 if ($stringForDigit='0x00022220020000220200022202002020020020200220002022000020002222') then $num=0 if ($stringForDigit='0x00002000002220000000200000002000000220000002000000020000002222') then $num=1 if ($stringForDigit='0x00022220020000220000002200002200000022000020000022000000222222') then $num=2 if ($stringForDigit='0x00022220020000220000002200002200000022000000002022000020002222') then $num=3 if ($stringForDigit='0x00000220000022000022020002000200020002000222222000002200000022') then $num=4 if ($stringForDigit='0x02222222020000000222220000000020000000200000002022000020002222') then $num=5 if ($stringForDigit='0x00002220002200000200000002222200022222000200002022000020002222') then $num=6 if ($stringForDigit='0x02222222000000220000020000002000000020000020000000200000002000') then $num=7 if ($stringForDigit='0x00022220020000220200002200222200002222000200002022000020002222') then $num=8 if ($stringForDigit='0x00022220020000220200002200222222002222200000002000002200002200') then $num=9 consolewrite($num) EndIf if ($showDigits=true) then ;~ consolewrite("-" & $checksum & "-" & $stringLine1 & @CRLF) ;~ $stringLine1=StringRegExpReplace($stringLine1,"[1-9A-Za-z]+","1") ;~ For $picIdLine = 0 To $heightMatrix-1 step 2 For $picIdLine = 0 To $heightMatrix-1 ;~ From the screenshots we can ignore the first 16 bytes (remember in text its 2 characters ;~ $binaryLine=BinaryMid($bmp1Data,($picId*$BMP1LineWidth)+16,$BMP1LineWidth) ;~ and we only need 4 digits which takes about 28 characters and 1 character separator = local $stringLine=stringMid($stringForDigit,($picIdLine * ($stride * 2))+3,($stride*2)-3) ;~ Lets make it readable $stringLine=StringReplace($stringLine,"0",".") ;~ $stringLine=StringRegExpReplace($stringLine,"[0]+",".") ;~ $stringLine=StringRegExpReplace($stringLine,"[1-9A-Za-z]+","1") ;~ $stringLine=StringRegExpReplace($stringLine,"1+","x") $textoutput&=stringformat("%02i",$picIdLine) & " : " & $stringLine & @CRLF next ControlSetText("","",$editBox,$textOutput) ;~ Not working propertly? ;~ local $checkSum=PixelChecksum($leftMatrix, $rightMatrix , $topMatrix, $bottomMatrix, 1, 0 ,1) ;~ consolewrite($checksum & " - ") ;~ Minus two just as it influences the next screenshot _Screen_DrawRect( $leftMatrix, $rightMatrix-4 , $topMatrix, $bottomMatrix) ;~ if ($charId=1) then ;~ MsgBox($MB_SYSTEMMODAL, "Title", "This message box will timeout after 10 seconds or select the OK button.", 10) ;~ EndIf SLEEP (100) EndIf Next consolewrite(@crlf) Next EndFunc Func GetImageDataFromScreen($left, $top, $right, $bottom, byref $BMPDataStart, byref $Width, byRef $Height, byref $Stride, $picIdmgBytes=3) local $Scan0, $pixelData, $hbScreen, $pBitmap, $pBitmapCap, $handle, $bitMapdata, $pixelFormat ; Capture screen to load the bitmap to search in ;~ _ScreenCapture_Capture(@UserProfileDir & "\downloads\examples\test.png",$left, $top, $right, $bottom,False) ;~ _ScreenCapture_Capture("",$left, $top, $right, $bottom,False) $hbScreen=_ScreenCapture_Capture("",$left, $top, $right, $bottom,False) local $pBitmap1 = _GDIPlus_BitmapCreateFromHBITMAP($hbScreen); returns memory bitmap _WinAPI_DeleteObject($hbScreen) ;release GDI bitmap resource because not needed anymore Local $pBitmap= _GDIPlus_ImageResize($pBitmap1, 8, 8) ;resize image ;~ Local $pBitmap= _GDIPlus_ImageScale($hBitmap, 0.5, 0.5) ;resize image ;Get $tagGDIPBITMAPDATA structure ;~ ConsoleWrite("Bitmap Width: " & _GDIPlus_ImageGetWidth($pBitmap) & @CRLF ) ;~ ConsoleWrite("Bitmap Height: " & _GDIPlus_ImageGetHeight($pBitmap) & @CRLF) ;~ 24 bits (3 bytes) or 16 bits (2 bytes) comparison if ($picIdmgBytes=1) then $BitmapData= _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF04INDEXED) Endif if ($picIdmgBytes=2) then $BitmapData= _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF16RGB555) ;~ $BitmapData= _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF32ARGB) EndIf if ($picIdmgBytes=3) then $BitmapData= _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF24RGB) ;~ $BitmapData= _GDIPlus_BitmapLockBits($pBitmap, 0, 0, _GDIPlus_ImageGetWidth($pBitmap), _GDIPlus_ImageGetHeight($pBitmap), $GDIP_ILMREAD, $GDIP_PXF32ARGB) endIf If @ERROR Then MsgBox(0,"","Error locking region " & @error) $Stride = DllStructGetData($BitmapData, "Stride");Stride - Offset, in bytes, between consecutive scan lines of the bitmap. If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up. $Width = DllStructGetData($BitmapData, "Width");Image width - Number of pixels in one scan line of the bitmap. $Height = DllStructGetData($BitmapData, "Height");Image height - Number of scan lines in the bitmap. $PixelFormat = DllStructGetData($BitmapData, "PixelFormat");Pixel format - Integer that specifies the pixel format of the bitmap $Scan0 = DllStructGetData($BitmapData, "Scan0");Scan0 - Pointer to the first (index 0) scan line of the bitmap. $pixelData = DllStructCreate("ubyte lData[" & (abs($Stride) * $Height-1) & "]", $Scan0) $BMPDataStart = $BMPDataStart & DllStructGetData($pixeldata,"lData") _GDIPlus_BitmapUnlockBits($pBitmap, $BitmapData) _GDIPlus_ImageDispose ($pBitmap) _WinAPI_DeleteObject ($pBitmap) _WinAPI_DeleteObject ($hbScreen) EndFunc;==>GetImage ; Draw rectangle on screen. Func _Screen_DrawRect($tLeft, $tRight, $tTop, $tBottom, $color = 0xFF, $PenWidth = 1) Local $hDC, $hPen, $obj_orig, $x1, $x2, $y1, $y2 $x1 = $tLeft $x2 = $tRight $y1 = $tTop $y2 = $tBottom $hDC = _WinAPI_GetWindowDC(0) ; DC of entire screen (desktop) $hPen = _WinAPI_CreatePen($PS_SOLID, $PenWidth, $color) $obj_orig = _WinAPI_SelectObject($hDC, $hPen) _WinAPI_DrawLine($hDC, $x1, $y1, $x2, $y1) ; horizontal to right _WinAPI_DrawLine($hDC, $x2, $y1, $x2, $y2) ; vertical down on right _WinAPI_DrawLine($hDC, $x2, $y2, $x1, $y2) ; horizontal to left right _WinAPI_DrawLine($hDC, $x1, $y2, $x1, $y1) ; vertical up on left ; clear resources _WinAPI_SelectObject($hDC, $obj_orig) _WinAPI_DeleteObject($hPen) _WinAPI_ReleaseDC(0, $hDC) EndFunc ;==>_UIA_DrawRect1 point
-
How to dismiss a UAC prompt?
argumentum reacted to RoadHazard for a topic
Thanks. I’ll try that next.1 point -
Windows Debug Messages?
ioa747 reacted to argumentum for a topic
All of them ? Some of them ? One in particular ? The kernel is the OS, the rest is 3rd party. Explorer.exe is 3rd party and you can replace it. Look into taskScheduler and create a task, ..on trigger: "When a specific event is logged", then choose "Log", "Source" and "Event ID". Make that call your script. Unless you present better information, this is my best advise to not peek constantly.1 point -
Uploaded an updated beta installer v25.205.1420.2 which contains an updated AutoIt3Wrapper v25.205.1420.1, where /addincludes parameter works again correctly. I stripped out a little too much when removing the previously required "filename with special characters" support.1 point
-
Fingers crossed that everything turns out well for you and your daughter .1 point
-
Goodo on your progress, and I really hope things work out well with your daughter.1 point
-
Update 1-13-2025 I've finished the basics of the weather/seasonal control system, and so far in testing it works great. BUT More delays. On a personal note, a possible life changing situation is upon me, it won't stop development but it's going to delay things quite a bit over the next month or so, especially over the next couple of weeks. I've been notified by my state's department of child safety that my estranged 8 year old daughter is in the midst of a safety concern with her mother's deadbeat boyfriend, and I may -possibly- be getting custody of the child. If that is the case, I'll have to put things on hold for a few weeks to prepare/child proof my home to their department's standards and other facilitation. Hopefully this will be a happy change and I'm really hoping to get custody as her mother has been uncooperative in visitations and such. We'll see what happens....1 point
-
Strange behaviour (file deleted) with FileCopy ()
argumentum reacted to Jemboy for a topic
We are running a legacy RDP server and after the upgrade of our Windows 11 computers, I got complaints about the server screen going beserrk. Initially because these 2 users, recently had their computer renewed with Windows 11 24H2, I suspected the Intel graphic card. However reinstalling the computers with 23H2 (we have Win11 23H2 PC running fine), I discovered that Win 11 24H2 must have been the culprit. Googling ultimately let me to site https://www.petenetlive.com/kb/article/0001901 and some other sites, to point to the mstsc* files being updated in 24H2. To mitigate the problem, I am writing a script overwrite the 24H2 mstsc* files bij the ones from 23H2, I am keeping my fingers crossed that the issue wil be resolved in the next months or we will be having enough time to update the legacy server to Windows Server 2025. Having heart about Win 11 24H2 horror stories, I to am living the dream by having this RDP issue and an issue with restoring an image, made with a 3rd party diskimager not working (works with 23H2).1 point -
Visual Studio Code Extension currently available and future plans for SciTE?
donnyh13 reacted to WildByDesign for a topic
There is only one feature that I really miss in SciTE4AutoIt3 and that is the Ctrl+Shift+Z dynamic includes feature where it scans your whole script file and adds any missing include files to your script. If that could somehow be added to the VSCode extensions that would be very useful.1 point -
Are there any patterns in which serials/results that fail? Is it the same every run, the same results that fails, or is it random, it's really difficult to help when we dont have access to the tools.exe program to test ourselfes As for the filewritefromarray, you could instead of using an array use a single big string, then it's just a simple filewrite. Local $BigString = "" For $loop = 0 To 999999 ControlClick($tool, "", "TTabSheet1", "primary", 1, 100, 100) _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $BigString &= String(StringFormat('%06i', $loop)) & "," & String(GetNumber($result)) & @LF Next _WinAPI_DeleteDC($hCDC) FileWrite($db, $BigString) Something like this.1 point
-
On Win10, Microsoft had the brilliant idea to link agenda with calendar. And now it is kind of exhausting to have a simple alarm to get a notification when time comes up. So I made one : #NoTrayIcon #AutoIt3Wrapper_Icon=Alarm.ico #include <GUIConstants.au3> #include <Constants.au3> Opt("MustDeclareVars", True) Opt("TrayOnEventMode", 1) Opt("TrayMenuMode", 1) Opt("TrayAutoPause", 0) Global Const $DELAY = 5 Local $hGUI = GUICreate("Alarm", 400, 500, -1, -1, $WS_SYSMENU) GUISetIcon("Alarm.ico") GUISetFont(12) Local $idName = GUICtrlCreateInput("Event", 30, 30, 200, 25) Local $aAccelKeys[1][2] = [["{TAB}", $idName]], $iMsg GUISetAccelerators($aAccelKeys) GUISetState() Do $iMsg = GUIGetMsg() If $iMsg = $GUI_EVENT_CLOSE Then Exit Until $iMsg = $idName Local $sName = GUICtrlRead($idName) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlCreateLabel("⌚", 30, 80, 15, 25, $SS_CENTERIMAGE) GUICtrlSetColor(-1, 0x0000FF) Local $vHour = String(Mod(@HOUR + 1, 24)), $vMin = "00" Local $idTime = GUICtrlCreateLabel("" & $vHour & " : " & $vMin, 60, 80, 58, 25, $SS_SUNKEN + $SS_CENTERIMAGE + $SS_CENTER) Local $idAccept = GUICtrlCreateLabel("✔", 40, 120, 30, 30) GUICtrlSetColor(-1, 0x099007) Local $idExit = GUICtrlCreateLabel("✖", 70, 120, 30, 30) GUICtrlSetColor(-1, 0xFF0000) Local $aAccelKeys[2][2] = [["{ENTER}", $idAccept], ["{ESC}", $idExit]] GUISetAccelerators($aAccelKeys) Do $iMsg = GUIGetMsg() If $iMsg = $GUI_EVENT_CLOSE Or $iMsg = $idExit Then Exit Until $iMsg = $idTime Or $iMsg = $idAccept If $iMsg = $idTime Then Local $idHour = GUICtrlCreateList("", 110, 10, 40, 450, 0) GUICtrlSetData(-1, "0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23", $vHour) Local $idMin = GUICtrlCreateList("", 150, 100, 40, 230, 0) GUICtrlSetData(-1, "00|05|10|15|20|25|30|35|40|45|50|55", $vMin) Do $iMsg = GUIGetMsg() If $iMsg = $GUI_EVENT_CLOSE Or $iMsg = $idExit Then Exit Until $iMsg = $idAccept $vHour = GUICtrlRead($idHour) $vMin = GUICtrlRead($idMin) EndIf GUIDelete() TraySetIcon("Alarm.ico") TraySetOnEvent($TRAY_EVENT_PRIMARYUP, Terminate) TraySetState($TRAY_ICONSTATE_SHOW) TraySetToolTip($sName & " starts at " & $vHour & ":" & $vMin & @CRLF & "Left click to quit") $vHour = Number($vHour) $vMin = Number($vMin) If Mod($vMin + 60 - $DELAY, 60) > $vMin Then $vHour = Mod($vHour + 23, 24) $vMin = Mod($vMin + 60 - $DELAY, 60) Else $vMin -= $DELAY EndIf While Sleep(1000) If Number(@HOUR) = $vHour And Number(@MIN) = $vMin Then Exit MsgBox($MB_ICONWARNING + $MB_TOPMOST, "Attention", $sName & " will start in " & $DELAY & " minutes") WEnd Func Terminate() Exit EndFunc Alarm.ico1 point
-
$sIP = '192.168.4.242' MsgBox(0, '', _IPStrToDec($sIP)) Func _IPStrToDec($sIP) Local $tDWord, $Val = StringSplit($sIP, '.') If $Val[0] < 4 Then Return SetError(1, 0, '') EndIf $Val = BitShift($Val[1], -24) + BitShift($Val[2], -16) + BitShift($Val[3], -8) + $Val[4] $tDWord = DllStructCreate('dword') DllStructSetData($tDWord, 1, $Val) Return DllStructGetData($tDWord, 1) EndFunc ;==>_IPStrToDec1 point
-
What you and Cyberslug suggested both do exactly the same thing.1 point