-
Posts
889 -
Joined
-
Last visited
-
Days Won
3
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by BinaryBrother
-
This is an awesome idea and quite creative. It almost favors C#.
-
Can someone tell me what's going on, here?
BinaryBrother replied to BinaryBrother's topic in AutoIt General Help and Support
Ugh, what a rookie thing to miss. Thanks @argumentum -
Attempting to Run [F5] this script, the console tells me that a referenced Global Variable $bGet_ARP_Table_FirstRun at line 88 isn't declared. Yet it clearly is declared, as Global, on line 9. #include <MsgBoxConstants.au3> #include <Array.au3> Global $sDatabase_Path = @ScriptDir & "\NetworkMonitor.ini" Global $sIP = _GetGatewayIP() Global $aIP = StringSplit($sIP, ".") Global $aARP_Table = _Get_ARP_Table() Global $bFill_ARP_Table_FirstRun = True Global $bGet_ARP_Table_FirstRun = True $aARP_Table = _Get_ARP_Table() _ArrayDisplay($aARP_Table) $aData = IniReadSection($sDatabase_Path, "Monitor") While 1 For $N = 1 To $aData[0][0] ;$aData[$N][0] = MAC Address ;$aData[$N][1] = User $lReturn = _PingMAC($aData[$N][0]) If @error Or $lReturn = False Then ConsoleWrite("WARNING: Unable to communicate with " & $aData[$N][1] & @CRLF) _Tracker($aData[$N][0], "DOWN") ;MsgBox($MB_OK, "Network Snitch", $aData[$N][1] & " left the network!") Else _Tracker($aData[$N][0], "UP") EndIf Sleep(500) Next WEnd Func _GetReturn($sCommand) Local $lReturn = Run(@ComSpec & " /c " & $sCommand, "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) Local $lOutput = "" While 1 $lOutput &= StdoutRead($lReturn) If @error Then ExitLoop $lOutput &= StderrRead("ERROR:" & $lReturn) WEnd Return $lOutput EndFunc ;==>_GetReturn Func _GetActiveIP() Local $aIP_Address[5] $aIP_Address[1] = @IPAddress1 $aIP_Address[2] = @IPAddress2 $aIP_Address[3] = @IPAddress3 $aIP_Address[4] = @IPAddress4 For $N = 1 To 4 $lReturn = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION, "Network Snitch", "Is this your proper network IP?" & @CRLF & $aIP_Address[$N]) If $lReturn = $IDYES Then Return $aIP_Address[$N] EndIf Next EndFunc ;==>_GetActiveIP Func _GetGatewayIP() Local $lReturn = _GetReturn("tracert -d -h 1 -4 8.8.8.8") Local $aIPs = StringRegExp($lReturn, "(\d+\.\d+\.\d+\.\d+)", 3) Return $aIPs[1] EndFunc ;==>_GetGatewayIP Func _Fill_ARP_Table() ; This function will scan the network for devices and add them to the ARP Table Local $lIP Local $lProgress If $bFill_ARP_Table_FirstRun Then SplashTextOn("Network Snitch", "Scanning Network...", 300, 100, -1, -1, 1, "", 14) For $N = 1 To 255 $lIP = $aIP[1] & "." & $aIP[2] & "." & $aIP[3] & "." & $N ConsoleWrite("Pinging: " & $lIP & @CRLF) Run(@ComSpec & " /c ping -n 5 -w 2000 " & $lIP, "", @SW_HIDE) If $bFill_ARP_Table_FirstRun Then $lProgress = Round(($N / 255) * 100, 2) If $bFill_ARP_Table_FirstRun Then ControlSetText("Network Snitch", "", "Static1", "Scanning Network..." & @CRLF & "Progress: " & $lProgress & "%") Sleep(50) Next If $bFill_ARP_Table_FirstRun Then SplashOff() $bFill_ARP_Table_FirstRun = False EndFunc ;==>_Fill_ARP_Table Func _Get_ARP_Table() If $bGet_ARP_Table_FirstRun Then _Fill_ARP_Table() Local $lReturn = _GetReturn("arp -a") $lReturn = StringSplit($lReturn, @CRLF, 1) $bGet_ARP_Table_FirstRun = False Return $lReturn EndFunc ;==>_GetARPTable Func _PingIP($pIP) Local $iFailCount = 0 Local $lReturn For $N = 1 To 4 $lReturn = Ping($pIP, 2000) If Not @error And $lReturn >= 1 Then ContinueLoop Else $iFailCount += 1 EndIf Sleep(500) Next If $iFailCount >= 0 Then Return SetError($iFailCount, 0, False) Else Return True EndIf EndFunc ;==>_PingIP Func _Tracker($sMAC, $sStatus) IniWrite($sDatabase_Path, "Tracker", $sMAC, $sStatus) ; Add additional tracking logic here if needed EndFunc ;==>_Tracker Func _PingMAC($sMAC) ConsoleWrite("_PingMAC(): " & $sMAC & @CRLF) Local $aMonitor = IniReadSection($sDatabase_Path, "Entry") For $N = 1 To $aMonitor[0][0] If StringInStr($aMonitor[$N][1], $sMAC) Then ConsoleWrite("_PingMAC(): Found IP in DB " & $aMonitor[$N][0] & @CRLF) $lReturn = _PingIP($aMonitor[$N][0]) If Not @error Then ConsoleWrite("_PingMAC(): " & $aMonitor[$N][0] & " is UP!" & @CRLF) Return True Else ConsoleWrite("_PingMAC(): " & $aMonitor[$N][0] & " is DOWN!" & @CRLF) Return False EndIf EndIf Next EndFunc ;==>_PingMAC Console: >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "d:\Dropbox\Projects\NetworkMonitor\AutoIt\NetworkMonitor.au3" /errorstdout +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart. --> Press Ctrl+BREAK to Stop. "d:\Dropbox\Projects\NetworkMonitor\AutoIt\NetworkMonitor.au3" (82) : ==> Variable used without being declared.: If $bGet_ARP_Table_FirstRun Then _Fill_ARP_Table() If ^ ERROR > ->14:15:20 AutoIt3 ended. rc:1 +>14:15:21 AutoIt3Wrapper Finished. ->Exit code 1 Time: 1.652 I tried both in @Jos's ScITE Beta, and VSCode. I am seriously confused. I think it's one of those things where there's an error somewhere else that's causing this.
-
When you type #include, the shadow suggestions usually predict the include you need. Not quite as easy as a hotkey, but still pretty nifty. Fixing with Co-Pilot also adds necessary includes. https://app.screencast.com/rHFLFV43SGj2v Since I just had to use it, now I'm wondering about the GUI Builder. But it's pretty much its-own program. The LUA that you're talking about, with the CTRL+Shift+Z is one of the things that Jos is worried about porting, methinks.
-
IMHO damien.autoit Pros: Suggestions work, F5 launches the script and returns proper console, it has Tidy under the command pallet. VSCode is understanding and makes excellent suggestions. Cons: I'm not sure how to compile or where the compilation options are for my script, though. If you click Debug, it acts like it's missing the extension. Random indent issues (which I've always used Tidy to fix, even in ScITE)
-
Ubuntu Installed as a VMware Virtual Machine
BinaryBrother replied to capatinxarzu's topic in Operating System Deployment
I just use the openvm packages. It's just OpenSource version on VMWare Tools, that happens to be easily found in the APT package manager. sudo apt update && sudo apt -y install open-vm-tools -
It's a relatively fresh install of Windows 11 24H2, one primary administrative account. I haven't messed with ACLs, groups, or permissions. I would assume that I'm in the admin group, since I can carry out administrative operations. What is the fastest way to check? It's been a while since I messed with groups outside Linux. Edit: I just re-downloaded the ScITE install from your link and tried again. It still doesn't detect my VSCode install. I'll re-download it from a different browser to make sure caching isn't an issue. It still doesn't work for me. 😕 I bet if I ticked those check boxes on the VSCode Installer it would. X) - It still didn't work. I'll try it on a fresh Win11 VM and see what happens. I tried it in a fresh Win11 24H2 VM and it worked as expected. There must be something off about my setup... I have no idea what's going on, but the issue that I'm having appears to be a fluke relevant only to my particular setup and install.
-
I just grabbed it from the site https://code.visualstudio.com/ https://vscode.download.prss.microsoft.com/dbazure/download/stable/33fc5a94a3f99ebe7087e8fe79fbe1d37a251016/VSCodeUserSetup-x64-1.97.0.exe and installed it normally. I'm going to rerun the installer.
-
VSCode seems to be widely used. The predictive features of VSCode are incredibly handy and GitHub's Co-Pilot has access to AutoIt's documentation. As far as wasting effort, maybe grouping with @genius257 and @LoganCH could accelerate the process of officiating an AutoIt extension. I've been experimenting with the damien.autoit @LoganCH extension and am highly impressed. He's put some time and effort into it.
-
Woah. That would be an idea. I use VSCode and Github Copilot all the time. Edit: Well holy shit, some people have it working and it even works with the shadow suggestions. F5 Actually ran and returned console. I'm going to experiment with VSCode for a while, I hadn't realized that was an option. https://app.screencast.com/URbDfl7s3Vdei I like it! Thanks for the recommendation! Edit: I forgot about Tidy... Maybe the way they "Format Document" will be good enough. Edit: Check this out... CoPilot is making recommendations for my UDF to meet UDF-Spec. https://app.screencast.com/cIO6jNdUM6mVi Warning, though... It doesn't fully understand AutoIt but does a pretty good job of interpreting certain things. At least I can use it for header generation. Last Edit: Gotta watch the Copilot with your code, though. It messed up some of my functions while adding the headers.
-
When I create or modify a function, ex Func _Test() When I hit return at the end of that line, it doesn't auto-tab like the normal Scite does, so you're starting in the right place. Furthermore, when I do hit tab, it adds a line of whitespace underneath. I recorded a video of what I'm talking about. If I knew the names of what I'm talking about I could search the threads. I'm so naive when it comes to ScITE behavior. I don't remember this happening before... Maybe I accidentally changed something? https://app.screencast.com/Ye8sgIrN5jn2R?conversation=kVzfwHR5ziWsdaEyCkgKKr
-
I put in an hour or two to bring this UDF up-to-code (UDF-Spec). I want to get it officially listed somewhere, it's pretty cool. I believe I've still have plenty of work left in adding the headers, etc. 1/27/25 - Finished UDF Spec. I think...
-
Win11 24H2 X64 - On Primary monitor not maximized. It was maximized on my far right (3rd) monitor when I ran it last time. *shrug*. P.S. I'm not sticking with those ScITE colors, I messed it up. X) 0x0000000000050B80 1 = F0F4F9 = 1295139178 2 = F0F4F9 = -72188319 3 = F0F4F9 = 1364808461 4 = F0F4F9 = -1620914717 5 = F0F4F9 = 1364808461 6 = F0F4F9 = -2078673808 7 = F0F4F9 = -1620914717 8 = F0F4F9 = 1364808461 9 = F0F4F9 = 1364808461 10 = F0CB86 = 1364808461 11 = F0F4F9 = 1364808461 12 = F7832E = 1364808461 13 = FE83CF = 1364808461 14 = F0F4F9 = 1364808461 15 = F0F4F9 = 1364808461 16 = F0F4F9 = 1364808461 17 = FAF4F9 = 1364808461 18 = F0F4F9 = 1364808461 19 = F0F4F9 = 1364808461 20 = F0F4F9 = 1364808461
-
Update: 1/23/25 - Overhauled some portions of the code with redundancy and timers. I figured out most of the issues. It's been re-tested on Win10 and Win11 via VM and @Trong helped with some testing as well. Seems like she's gonna float, for now.
-
Huh?... I doubt you're going to get anywhere with that report, because I'm being serious. I've been here for over 18 years. I'm running a triple-monitor setup, so that's what I figured the issue was. Read the rest of my threads and you'll see that I don't aggravate people. I'm here to learn, build, and occasionally help others. I was just curious, ran your script from ScITE on my 3rd monitor, and my ScITE moved to my middle monitor with no body and I was unable to interact with it.