Leaderboard
Popular Content
Showing content with the highest reputation on 01/18/2014 in all areas
-
Someone infected my computer using AutoIt - Please help me with removal
somdcomputerguy and one other reacted to Melba23 for a topic
Flamo353, I am very sorry that your machine has been infected, but AutoIt as such is blameless. AutoIt is a language like any other (e.g. the various flavours of C, Python, Java, etc) which can be used to write apps. Most people write useful or instructive programs; some, alas, use it to write malware and you appear to have fallen foul of one of these unpleasant individuals. A glance at our Forum rules (there is also a link at bottom right of each page) will show you that we have no truck with such idiots here, but obviously we have no ability to stop these people other than here in our own forum. You have been offered some good advice above as to how you might proceed - I suggest that you follow it if you feel confident in so doing. If not, then I suggest you seek professional help - as has been pointed out, this forum is for helping decent coders with problems in Autoit coding, not for giving out advice on PC malware removal. Good luck. M232 points -
Cubex
FlashpointBlack and one other reacted to Melba23 for a topic
And the unimaginatively named CubexSoftware is automatically banned as well. When we say "permanently banned" we mean it. M232 points -
Last updated 9/10/21 * Image may not represent current product Features Simple Integrated countermeasures against file and memory analysis based decompilers. Add basic types of resources into the interpreter or other types as raw data. Define multiple programs to execute pre and post build. Create and include pe version information. User defined patches that can be implemented globally on the interpreter and compiler or selectively. Handles its own basic macro's as well as environment variables in most fields for easier path finding. Drag and drop configs (script bound or separate) to the input edit box or to the icon to load them. Configuration settings can be copied to the clipboard or saved as config files or Au3 scripts. Settings can now be saved directly to an AutoIt3 script. Subsystem independant, can act as a gui or console tool. And much more. See next post for update information. A3C_97.16b.7z A3C_98_18_b.zip1 point
-
Copy text froom website ?
elmoi0010 reacted to somdcomputerguy for a topic
I see you already got a solution, but here's another one.. #include <INet.au3> #include <String.au3> Opt('MustDeclareVars', 1) Local $URL = "http://somdcomputerguy.com", $Needle, $Haystack $Haystack = _INetGetSource($URL) $Needle = _StringBetween($Haystack, '<p class="mainline_2">', '<br>') MsgBox(4096, 'Needle in a Haystack', $Needle[0])1 point -
You (or your software) can't write to HKLM yust like that. Add #RequireAdmin at the top of your script and you'll get what you want.1 point
-
Handy Functions
guestscripter reacted to Bartokv for a topic
Below are a few custom functions that I've created, and use fairly regularly in my scripts. I don't know if anybody else would find them as useful as I, but I thought that I'd post them just in case. Please keep in mind that I'm new to AU3, so if you have any recommendations for code improvement please let me know. ...Enjoy! ; **************************************************************************** ; Returns the Variable type (STRing, NUMber, FLoaT, ARraY, INTeger, ERRor) ; **************************************************************************** Func TypeOf($TypeOfVariableName) $TypeOfReturnValue = "ERR" ; This value should never be returned If IsString($TypeOfVariableName) Then $TypeOfReturnValue = "STR" If IsNumber($TypeOfVariableName) Then $TypeOfReturnValue = "NUM" If IsFloat($TypeOfVariableName) Then $TypeOfReturnValue = "FLT" If IsArray($TypeOfVariableName) Then $TypeOfReturnValue = "ARY" If IsInt($TypeOfVariableName) Then $TypeOfReturnValue = "INT" Return $TypeOfReturnValue EndFunc ; **************************************************************************** ; Returns a String Conisting of the Specified Character and Length ; **************************************************************************** Func Pad($PadChar, $PadLen) If $PadChar == "" Then $PadChar = " " ; Use space as default padding If $PadLen > 500 Then $PadLen = 500 ; Try to keep limit reasonable If $PadLen < 0 Then $PadLen = 0 ; Idiot-proofing - just in case $PadOutString = "" For $PadCount = 1 To $PadLen $PadOutString = $PadOutString & $PadChar Next Return $PadOutString EndFunc ; **************************************************************************** ; Centers Text within the Specified Width ; **************************************************************************** Func Center($CenterString, $CenterWidth, $CenterSpacer) $CenterStringLen = StringLen($CenterString) If $CenterWidth < $CenterStringLen Then $CenterWidth = $CenterStringLen If $CenterSpacer = "" Then $CenterSpacer = " " $CenterOutString = "" $CenterPadding = ($CenterWidth - $CenterStringLen) / 2 If INT($CenterPadding) <> $CenterPadding Then $CenterLeftPadding = INT($CenterPadding) + 1 $CenterRightPadding = INT($CenterPadding) Else $CenterLeftPadding = $CenterPadding $CenterRightPadding = $CenterPadding EndIf $CenterOutString = Pad($CenterSpacer, $CenterLeftPadding) & $CenterString & Pad($CenterSpacer, $CenterRightPadding) Return $CenterOutString EndFunc ; **************************************************************************** ; Resizes the Specified Array to the Desired Depth ; **************************************************************************** Func ResizeArray(ByRef $ArrayName, $ArraySize) If TypeOf($ArrayName) <> "ARY" Then Return SetError(1) If TypeOf($ArraySize) <> "INT" Then Return SetError(2) If $ArraySize < 0 Then $ArraySize = 0 ; Idiot-proofing - just in case Dim $ArrayTempValues[$ArraySize] ; Create swap array with new size $ArrayOldMax = Ubound($ArrayName) - 1 ; Get size of original array If $ArraySize < $ArrayOldMax Then ; Try to avoid needless bloat $ArrayCountMax = $ArraySize - 1 Else $ArrayCountMax = $ArrayOldMax Endif For $ArrayCounter = 0 to $ArrayCountMax ; Populate swap array with data $ArrayTempValues[$ArrayCounter] = $ArrayName[$ArrayCounter] Next $ArrayName = $ArrayTempValues ; Replace original array with swap $ArrayTempValues = "" ; Dump swap array to free memory EndFunc ; **************************************************************************** ; Retreives Header Block Names from the Specified INI File ; **************************************************************************** Func Get_INI_headers($INI_file, ByRef $INI_ArrayName) $INI_stream = FileOpen($INI_file, 0) If TypeOf($INI_ArrayName) <> "ARY" Then Return SetError(1) $INI_count = 1 ; Verify file is open for reading If $INI_stream == -1 Then MsgBox(1, "Error", "Unable to open configuration file.") Return SetError(1) EndIf Dim $INI_head[1] ; Read in lines of text until the EOF is reached While 1 Sleep(10) ; Release some ticks to CPU $line = FileReadLine($INI_stream) ; Get next line in file If @error == -1 Then ExitLoop If StringLeft($line, 1) == "[" Then ; Header block marker found... $HeadName = StringSplit($line, "[]") If $HeadName[0] > 2 Then ; Verify INI Header name is valid ResizeArray($INI_ArrayName, $INI_count) $INI_ArrayName[$INI_count - 1] = $HeadName[2] $INI_count = $INI_count + 1 EndIf Endif Wend FileClose($INI_stream) EndFunc1 point -
1 point
-
Java/SunAwtFrame data entry and automation
guestscripter reacted to junkew for a topic
you could try this '?do=embed' frameborder='0' data-embedContent>>1 point -
Copy text froom website ?
guestscripter reacted to mikell for a topic
#include <IE.au3> $oIE = _IECreate(....) ; put the url inside $oDivs = _IETagNameGetCollection($oIE, "div") $sTxt = "" For $oDiv In $oDivs If $oDiv.id == "meltmail" Then $sTxt = $oDiv.innertext Next MsgBox(0, "", $sTxt)1 point -
Question about a possible feature request.
jaberwacky reacted to Mat for a topic
This should be possible though: Local $a[][] = [[1, "A"], [2, "B"], [3, "C"], [4, "D"], [5, "E"]] For $n, $c in $a ConsoleWrite($n & " " & $a & @LF) Next1 point -
So it seems that javacl.exe is running on my computers start up using some java script. This program is keylogging me and I've already been hacked. I tried closing the program in task manager, but when I do, my screen turns blue and my computer crashes. I tried deleting the java script but a new one is recreated afterwards. I'm really wondering what autoit is and why it's able to crash my computer if I try closing this program.1 point
-
Convert string to array
jaberwacky reacted to czardas for a topic
If you know a repeating pattern will occur, then a third way would be to use regular expressions. In this case you are using a test string which is not what you will use in every case. It is not possible to create a general solution. A regular expression can often be written in different ways. ; #include <Array.au3> Local $sString = "test1test2test3" Local $aArray = StringRegExp($sString, "(?i)([a-z]+[0-9]+)", 3) _ArrayDisplay($aArray)1 point -
Get text (word) under the mouse pointer
michaelslamet reacted to Malkey for a topic
Formating the text appears to fix "the displaying the latest word while hovering blank areas". Also, I shortened PhoenixXL's Hover_WordDetect function of post #3. #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;#include <Array.au3> Global $hEdit Example() Func Example() ; Create GUI GUICreate("Edit Char From Pos", 400, 200, -1, -1, $WS_BORDER) GUICtrlCreateEdit("Kc and Kp are the equilibrium constants of gaseous mixtures 10" & @CRLF & @CRLF & _ "However, the difference between the two constants is that Kc is defined by molar concentrations," & @CRLF & @CRLF & _ "whereas Kp is defined by the partial pressures of the gasses inside a closed system." & @CRLF & @CRLF & _ "The equilibrium constants do not include the concentrations of single components such as liquids and solid, and they do not have any units.", 2, 2, 394, 168, 0) ; --- Format text i.e. add trailing newline, and, insert a space between all fullstops or comas and newlines. ----- If StringRegExp(GUICtrlRead(-1), "\v+$") = 0 Then GUICtrlSetData(-1, GUICtrlRead(-1) & @CRLF) GUICtrlSetData(-1, StringRegExpReplace(GUICtrlRead(-1), "(\V)(\v)", "\1 \2")) ; ------------------ End of formatting text ------------------------------------------------ $hEdit = GUICtrlGetHandle(-1) GUISetState(@SW_SHOW) For $i = 1 To 50 Sleep(500) If _WinAPI_GetFocus() = $hEdit Then ToolTip(Hover_WordDetect()) Else ToolTip("") EndIf Next GUIDelete() EndFunc ;==>Example Func Hover_WordDetect() Local $aCharPos[2], $iMousePos[2] $aCharPos = _GUICtrlEdit_CharFromPos($hEdit, _WinAPI_GetMousePosX(True, $hEdit), _WinAPI_GetMousePosY(True, $hEdit)) Local Const $sLine = _GUICtrlEdit_GetLine($hEdit, $aCharPos[1]) $aCharPos[0] -= _GUICtrlEdit_LineIndex($hEdit, $aCharPos[1]) ;ConsoleWrite($aCharPos[0] & @LF) If StringMid($sLine, $aCharPos[0] + 1, 1) == " " Then Return "" Else Return StringRegExpReplace($sLine, "(?s)^.{0," & $aCharPos[0] & "}(?: |^)([^ ]*).*$", "\1") EndIf EndFunc ;==>Hover_WordDetect Edit: Replace the single return "Return StringRegExpReplace($sLine, "(?s)^.{0," & $aCharPos[0] & "}(?: |^)([^ ]*).*$", "1")" with the If...Then...Else. Now when hovering the space between words, Null is returned. Edit2: Changed RE pattern in "Format text" section from "([,.])(v)" to "(V)(v)":; and, Changed 'Return Null' to 'Return "" '.1 point -
Startup in safe mode, delete the exe. Or, safe mode, restore to earlier image you stored from maybe a month or 2 ago. If you don't have one, then you learned a good lesson about backups. Last option would be a factory reset. If your game is to get someone to decompile it, it won't happen. If your game is to get the exe onto someone else's comp, good luck, but again, it won't happen.1 point
-
Someone infected my computer using AutoIt - Please help me with removal
onlineth reacted to DicatoroftheUSA for a topic
What makes you think Autoit is the source of your problem? It doesn't necessarily nothing to do with java. But I suspect you are trolling, as a rudemntary search will tell you exactly what Autoit is. But in any case, use http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx to see what is starting automatically with your computer.1 point -
trancexx, You flatter yourself - nothing would please me more than never having to have anything to do with you ever again. So you stop causing me to be called into threads to moderate and then I will have no reason to be there. Your choice. M231 point
-
1 point
-
BASS Function Library (Sound and Music Functions)
Gianni reacted to FlashpointBlack for a topic
As promised: This suits my needs at the moment, but I plan to add some other things to it as well, but it's at least usable now. The slider at the bottom sets the level the microphone must detect in order to detect it as a "clap". By default, I have the setting set to nearly deafening... I have twin three year old girls who enjoy screaming and running around while I'm trying to cook, so I have it set to where I need to clap very loudly to activate the next step. That's also the reason for requiring 3 sequential claps (to cut down on false positives). While they were napping, 2 worked just fine. I've included a few of our family's favorite recipes just as an example, but they're just glorified text files. If you dive into the AU3 instead of just using the exe, some basic configuration settings are near the top since I haven't gotten around to making a GUI settings window yet. I'm open to suggestions on how to improve it, as well as any constructive criticism anyone has to offer about the code itself. I'm always eager to grow! FlashCook.rar1 point -
Updated 2014-01-17: - New _LineTraverser UDF with floating point math to replace the old (now renamed _LineTraverserB) - Added Pacman examples 2014-01-17 'Hotfix': - Fixed majorly borked Atan2() code Lakes, thanks but I've about had enough of the PacGUI! haha.. Ah, and here's the final Pacman animated GUI example. The 'final' dot doesn't seem to always line up, and squares happen to draw better than ellipses so you'll have to make do - or improve it as you wish *Edit: Note, this example will eat up memory quickly. This is due to a bug in Windows where it doesn't properly dispose of previous Regions that have been applied to a Window. Unfortunately, there's no way to get at the region once Window takes over it either... In the future I may create a versoin with the 3 different 'animations' as 3 different GUI's and try swapping them in and out. It should alleviate the memory leak problem.. Pacman (Animated) Line-Traversing GUI, The Final Act #include "_LineTraverser.au3" #include "_GUIShapes.au3" #include <WinAPI.au3> ; ======================================================================================================== ; <LineTraverserPacmanExample.au3> ; ; Simple Example of using the <_LineTraverser.au3> and <_GuiShapes.au3> UDF's ; ; A little red-ball displays, while a 'Pacman' GUI moves towards it along a line ; An actual line is drawn onscreen to show the path from 'Pacman' to the red-ball target GUI, ; and then the PacGUI moves to it in $iStep increments. ; ; Additional Functions: ; _DrawPlainOldLine() ; Draws a line on the screen ; _DrawPacmanDottedLine() ; Draws a special Pacman-Dotted line ; _GUIApplyPacman() ; Converts a square GUI into a Pacman-shaped GUI. Regions are recreated ; ; each time, based on the input ; Atan2_Radians() ; An 'atan2()' vfunction ; ; Author: Ascend4nt ; ======================================================================================================== Global Const $iStep = 2 Local $hPacMan, $hDestCircle, $iExt, $iStepsTaken = 0, $iMode = 0, $fLineAngleRads = 0 Local $iXTarget, $iYTarget, $aLineTraverser ; Create the Pacman GUI and apply shape to it $hPacMan = GUICreate("", 81, 81, Random(0, @DesktopWidth - 20, 1), Random(0, @DesktopHeight - 20, 1), 0x80000000, 0x08000080 + 0x20) GUISetBkColor(Random(0x111111, 0xFFFFFF, 1), $hPacMan) _GUIApplyPacman($hPacMan, 0) ; Pink-dot GUI $hDestCircle = _CircleGUICreate(1, 1, 17, 0, 17, 0xDE8394) ; Set initial target point $iXTarget = Random(0, @DesktopWidth - 20, 1) $iYTarget = Random(0, @DesktopHeight - 20, 1) ; Source/Target are same to start off with $aLineTraverser = _LineTraverserCreate($iXTarget, $iYTarget, $iXTarget, $iYTarget) ; Move windows to start positions WinMove($hPacMan, '', $aLineTraverser[0], $aLineTraverser[1]) ; + Center of hollow circle, - half of target circle WinMove($hDestCircle, '', $iXTarget + 40 - 8, $iYTarget + 40 - 8) ; Transparency on 'seeker' circle WinSetTrans($hPacMan, '', 150) ; Show both GUIs, and put on top of all windows WinSetState($hDestCircle, '', @SW_SHOWNOACTIVATE) WinSetState($hPacMan, '', @SW_SHOWNOACTIVATE) WinSetOnTop($hPacMan, '', 1) WinSetOnTop($hDestCircle, '', 1) While 1 ; Exit on 'ESC' keypress (in down state) If BitAND(_WinAPI_GetAsyncKeyState(0x1B), 0x8000) Then ExitLoop ; < 10 ms sleep with an API call ;DllCall("kernel32.dll",'none','Sleep','dword',4) ; Slower allows to see mouth transitions better Sleep(10) If Not _LineTraverserStep($aLineTraverser, $iStep) Then $iExt = @extended ; Was there movement? Then moooove If $iExt Then WinMove($hPacMan, '', $aLineTraverser[0], $aLineTraverser[1]) EndIf $aPos = WinGetPos($hPacMan) ; Debug check. Should never be hit, so long as Window is moved to each step (including any last steps - see @extended) If $iXTarget <> $aPos[0] Or $iYTarget <> $aPos[1] Then ConsoleWrite("Mismatch: TargetX:" & $iXTarget & ", TraverserX:" & $aLineTraverser[0] & ", Current X:" & $aPos[0] & _ ", TargetY:" & $iYTarget & ", TraverserY:" & $aLineTraverser[1] & ", Current Y:" & $aPos[1] & ", @extended:" & $iExt & @CRLF) EndIf ; A little extra sleep to make it clear we've reached our destination. DllCall("kernel32.dll", 'none', 'Sleep', 'dword', 6) ; Now we'll set a new destination (with a visible line) Dim $iXTarget = Random(0, @DesktopHeight - 20, 1), $iYTarget = Random(0, @DesktopHeight - 20, 1) ;ConsoleWrite("New target: X: " & $iXTarget & ", Y: " & $iYTarget & ", FROM X: " & $aLineTraverser[0] & ", Y: " & $aLineTraverser[1] & @CRLF) ; Create a new Line-Traverser (no need to explicitly destroy the last one, it was just an array of numbers) $aLineTraverser = _LineTraverserCreate($aLineTraverser[0], $aLineTraverser[1], $iXTarget, $iYTarget) ; + Center of hollow circle, - center of target circle WinMove($hDestCircle, '', $iXTarget + 40 - 8, $iYTarget + 40 - 8) ; Apply Pacman GUI with calculated angle of line it should point towards $fLineAngleRads = Atan2_Radians($iYTarget - $aLineTraverser[1], $iXTarget - $aLineTraverser[0]) _GUIApplyPacman($hPacMan, $fLineAngleRads) ; Draw the line on-screen to give a visual indicator of the path that the hollow circle should take ; (note that the line will be overwritten by ANY screen activity, but that's fine for the example) ; Add 40 for the center of the hollow circle GUI _DrawPacmanDottedLine($aPos[0] + 40 - 1, $aPos[1] + 40 - 1, $iXTarget + 40 - 1, $iYTarget + 40 - 1) ; Or ;~ _DrawPlainOldLine($aPos[0] + 40 - 1, $aPos[1] + 40 - 1, $iXTarget + 40 - 1, $iYTarget + 40 - 1) Else $iStepsTaken += 1 If $iStepsTaken > 7 Then $iMode += 1 ;If $iMode > 2 Then $iMode = 0 ; Function masks off the needed bits _GUIApplyPacman($hPacMan, $fLineAngleRads, $iMode) $iStepsTaken = 0 EndIf WinMove($hPacMan, '', $aLineTraverser[0], $aLineTraverser[1]) EndIf WEnd Exit ; ================================================================================================================= ; Func _DrawPlainOldLine($iX1, $iY1, $iX2, $iY2) ; ; Draws a white line on the screen ; ; Author: Ascend4nt ; ================================================================================================================= Func _DrawPlainOldLine($iX1, $iY1, $iX2, $iY2) Local $hDC, $hPen, $hPenOld, $hBrush, $hBrushOld ; Get DC to screen $hDC = _WinAPI_GetDC(0) ; Create Pen (outline) [PS_SOLID = 0, PS_DASH = 1, PS_DOT = 2, PS_DASHDOT = 3, PS_DASHDOTDOT = 4, PS_NULL = 5] ; Seems no styles other than PS_SOLID work even if Width is <= 1, at least on the desktop DC in Win7 $hPen = _WinAPI_CreatePen(0, 3, 0xFFFFFF) ; Alternatively, get a Stock Pen.. (width 1 unfortunately) ; WHITE_PEN = 6, BLACK_PEN = 7, NULL_PEN = 8 ;$hPen = _WinAPI_GetStockObject(6) ; Create (or Get) Brush (fill) ; Doesn't seem to make a difference for Lines actually ; WHITE_BRUSH = 0, BLACK_BRUSH = 4, HOLLOW_BRUSH = 5 $hBrush = _WinAPI_GetStockObject(0) ; BS_SOLID = 0, BS_HOLLOW = 1, BS_HATCHED = 2 ;~ $hBrush = _WinAPI_CreateBrushIndirect(1, 0xFFFFFF, 0) ; Select Pen and Brush (saving old) $hPenOld = _WinAPI_SelectObject($hDC, $hPen) $hBrushOld = _WinAPI_SelectObject($hDC, $hBrush) _WinAPI_DrawLine($hDC, $iX1, $iY1, $iX2, $iY2) ; Select the old Brush and Pen back _WinAPI_SelectObject($hDC, $hBrushOld) _WinAPI_SelectObject($hDC, $hPenOld) ; Clean up pen & brush and then release DC _WinAPI_DeleteObject($hPen) ; _WinAPI_DeleteObject($hBrush) ; No need to delete Stock Objects _WinAPI_ReleaseDC(0, $hDC) Return True EndFunc ;==>_DrawPlainOldLine ; ================================================================================================================= ; Func _DrawPacmanDottedLine($iX1, $iY1, $iX2, $iY2) ; ; Draws a series of 'dots' on a given line. ; ; Unfortunately, in my tests, the Ellipse creates a bunch of artifacts, so the Rectangle is used to plot ; the dots. Some versions of Pacman look like they use squares anyway.. ; ; Author: Ascend4nt ; ================================================================================================================= Func _DrawPacmanDottedLine($iX1, $iY1, $iX2, $iY2) Local $hDC, $hPen, $hPenOld, $hBrush, $hBrushOld Local $aLineTraverser ; Line traverser for plotting Pac dots.. $aLineTraverser = _LineTraverserCreate($iX1, $iY1, $iX2, $iY2) ; Get DC to screen $hDC = _WinAPI_GetDC(0) ; Create Pen (outline) [PS_SOLID = 0, PS_DASH = 1, PS_DOT = 2, PS_DASHDOT = 3, PS_DASHDOTDOT = 4, PS_NULL = 5] $hPen = _WinAPI_CreatePen(5, 3, 0x00FFFF) ; Create (or Get) Brush (fill) ; [BS_SOLID = 0, BS_HOLLOW = 1, BS_HATCHED = 2] ; {Hatch Styles} HS_HORIZONTAL = 0, HS_VERTICAL = 1, HS_FDIAGONAL = 2, ; HS_BDIAGONAL = 3, HS_CROSS = 4, HS_DIAGCROSS = 5, HS_API_MAX = 12 $hBrush = _WinAPI_CreateBrushIndirect(0, 0xFFFF00, 0) ; Select Pen and Brush (saving old) $hPenOld = _WinAPI_SelectObject($hDC, $hPen) $hBrushOld = _WinAPI_SelectObject($hDC, $hBrush) ; We try to avoid drawing on the target circle While _LineTraverserStepsRemaining($aLineTraverser) > 30 ; Steps of 20 _LineTraverserStep($aLineTraverser, 20) ;~ _WinAPI_Ellipse($hDC, _WinAPI_CreateRect($aLineTraverser[0] - 5, $aLineTraverser[1] - 5, $aLineTraverser[0] + 5, $aLineTraverser[1] + 5)) _WinAPI_Rectangle($hDC, _WinAPI_CreateRect($aLineTraverser[0] - 5, $aLineTraverser[1] - 5, $aLineTraverser[0] + 5, $aLineTraverser[1] + 5)) WEnd ; Select the old Brush and Pen back _WinAPI_SelectObject($hDC, $hBrushOld) _WinAPI_SelectObject($hDC, $hPenOld) ; Clean up pen & brush and then release DC _WinAPI_DeleteObject($hPen) _WinAPI_DeleteObject($hBrush) _WinAPI_ReleaseDC(0, $hDC) Return True EndFunc ;==>_DrawPacmanDottedLine ; ================================================================================================================= ; Func _GUIApplyPacman($hGUI, $fAngleInRads, $nMouthMode = 0) ; ; Takes a GUI and applies a 'Pacman' shape to it. The angle of Pacman's mouth is based upon the $fAngleinRads ; variable. It also has 3 modes - mouth closed, partially open, or open to 90 degrees (rotated to face given angle) ; ; Parameters: ; $hGUI = GUI that will have a 'Pacman' Region applied to it ; $fAngleInRads = The Angle which the 'mouth' should center on, given in Radians (Degrees * PI / 180) ; $iMouthMode = 'Mode' of mouth: 0 (default) = 90 degree span, 1 = 40 degree span, 2 = closed (basic circle Region) ; ; Returns: ; Success: 1, @error = 0 ; Failure: 0, @error set ; ; Author: Ascend4nt ; ================================================================================================================= Func _GUIApplyPacman($hGUI, $fAngleInRads, $iMouthMode = 0) Local $aPos, $aVertices, $hEllipseRgn = 0, $hPieRegion = 0 Local $iCenterXY, $fMouthAngleRad $aPos = WinGetPos($hGUI) If @error Then Return SetError(1, 0, 0) $iCenterXY = $aPos[2] / 2 $iMouthMode = BitAND($iMouthMode, 3) Switch $iMouthMode Case 1 ; 20 Degrees $fMouthAngleRad = 0.34906585 Case 2 ; No adjustment necessary, we're using a full circle $fMouthAngleRad = 0 Case Else ; 45 Degrees $fMouthAngleRad = 0.78539816 EndSwitch Do ; Create a Basic Elliptical region $hEllipseRgn = _WinAPI_CreateEllipticRgn(_WinAPI_CreateRect(0, 0, $aPos[2], $aPos[3])) If $hEllipseRgn = 0 Then SetError(10) ExitLoop EndIf ; Everything OTHER than Mode 2 gets a 'mouth' applied If $iMouthMode <> 2 Then #cs ;; -------------- ; Vertices array: ; --------------- ; These vertices make up the mouth. ; Note that the multipler should typically be Radius, not $aPos[2] as here, if we were creating a line ; to the circumference of the circle. However, that would cause a weird triangle-inside-a-circle effect ; when combining Regions (leaving whats known as a 'Chord' behind). So we overextend it and let ; Windows clip the line at the GUI borders, which does its job of covering up the outer parts of the circle ; ----------------------------------------------------------------------------------------------------- #ce Dim $aVertices[3][2] = [ _ [$iCenterXY, $iCenterXY], _ ; We over-extend the lines here ($aPos[2] is way longer than the radius) [$iCenterXY + $aPos[2] * Cos($fAngleInRads - $fMouthAngleRad), $iCenterXY + $aPos[2] * Sin($fAngleInRads - $fMouthAngleRad)], _ [$iCenterXY + $aPos[2] * Cos($fAngleInRads + $fMouthAngleRad), $iCenterXY + $aPos[2] * Sin($fAngleInRads + $fMouthAngleRad)] _ ] ; Create the Pacman Pie area $hPieRegion = _WinAPI_CreatePolygonRgn($aVertices, 0, -1, 1) If $hPieRegion = 0 Then SetError(12) ExitLoop EndIf ; Combine, put resulting region in $hEllipseRgn. (RGN_AND = 1, RGN_OR = 2, RGN_XOR = 3, RGN_DIFF = 4) If Not _WinAPI_CombineRgn($hEllipseRgn, $hEllipseRgn, $hPieRegion, 4) Then SetError(14) ExitLoop EndIf ; Don't need this anymore (already combined with the Region injected into the GUI) _WinAPI_DeleteObject($hPieRegion) EndIf ; Set the region into the GUI. (GUI will then own it so there's no need to delete it) If Not _WinAPI_SetWindowRgn($hGUI, $hEllipseRgn, True) Then SetError(16) ExitLoop EndIf Return 1 Until 1 Local $iErr = @error, $iExt = @extended ; Cleanup _WinAPI_DeleteObject($hEllipseRgn) _WinAPI_DeleteObject($hPieRegion) Return SetError($iErr, $iExt, 0) EndFunc ;==>_GUIApplyPacman ; ================================================================================================================= ; Func Atan2_Radians($fY, $fX) ; ; Atan2() implementation, based on Wikipedia description. See notes ; ; atan2() differs from atan() in that it maps atan(Y/X) to correct Quadrants ; ; References: ; https://en.wikipedia.org/wiki/Atan2 ; https://en.wikipedia.org/wiki/Radian ; https://en.wikipedia.org/wiki/Cosine#Unit-circle_definitions ; ; Returns: Atan2() result in radians (for the flipped counterclockwise system) ; ; Author: Ascend4nt ; ================================================================================================================= Func Atan2_Radians($fY, $fX) Local Const $f_PI = 3.14159265 Local Const $f_PIHalf = $f_PI / 2 ;~ ConsoleWrite("Atan2 entry, $fY = " & $fY & ", $fX = " & $fX & @CRLF) If $fX = 0 Then ; Technically 'undefined' If $fY = 0 Then Return 0.0 If $fY < 0 Then Return -$f_PIHalf Else ; $fY >= 0 Return $f_PIHalf EndIf EndIf Local $fTmp = ATan($fY / $fX) If $fX < 0 Then If $fY < 0 Then Return $fTmp - $f_PI Else Return $fTmp + $f_PI EndIf Else ; $fX > 0 ; already checked == 0 at start Return $fTmp EndIf EndFunc ;==>Atan2_Radians1 point
-
TeamViewer 9 API
mLipok reacted to BinaryBrother for a topic
I've already created a bit of code for TV8 and it's pretty handy... Started on a UDF, but never made it. Here's what I have, which isn't much, but it might help someone playing with Tv8. TV8 interfacing was made more difficult, because of the advertisement being on TOP of the TeamViewer remote support window with a similar title, but invisible. So you need to be exact, using Opt("WinTitleMatchMode", 3). Oh, and very nice find on the TV9 API, mlipok. I've been waiting a while for this. @Jfish, You really can't think of one reason why someone would want to easily interface with a free remote support client? A preexisting UDF would make this easier... We all love easy... -Take note, this bit of code fits my personal needs and isn't in correct UDF form. For ex; It exits on error... Func _SetStatus($lStatus) ControlSetText("TeamViewer", '', "[CLASS:Static; INSTANCE:2]", $lStatus) EndFunc ;==>_SetStatus ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetTV_Info ; Description ...: Will get ID, Password, and Status from TV client. ; Syntax ........: _GetTV_Info($Switch) ; Parameters ....: $lSwitch - 1,2,3 [ID, Pass, Status] ; Return values .: 1 = ID, 2 = Password, 3 = Status, and 0/@error for error. ; Author ........: BinaryBrother ; =============================================================================================================================== Func _GetTV_Info($lSwitch) ; NEED Opt("WinTitleMatchMode", 3) SET! Local $lID, $lPass, $lStatus $lID = 0 $lPass = 0 $lStatus = 0 Select Case $lSwitch = 1 $lID = ControlGetText("TeamViewer", '', "[CLASS:Edit; INSTANCE:1]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV ID.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lID EndIf Case $lSwitch = 2 $lPass = ControlGetText("TeamViewer", '', "[CLASS:Edit; INSTANCE:2]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV password.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lPass EndIf Case $lSwitch = 3 $lStatus = ControlGetText("TeamViewer", '', "[CLASS:Static; INSTANCE:2]") If StringLen($lID) <= 0 Then If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Failed to acquire TV ID.") MsgBox(16, "Error", "Failed to interface with TeamViewer.") Exit Else Return $lStatus EndIf Case Else If $gDebug Then _Debug("_GetTV_Info(" & $lSwitch & "): Invalid Switch sent to method.") MsgBox(16, "Error", "Invalid switch while interfacing with TV.") EndSelect EndFunc ;==>_GetTV_Info Func _Debug($lInput) If Not @Compiled Then ConsoleWrite($lInput & @CRLF) Else FileWriteLine(@DesktopDir & "\TVS_Debug.txt", $lInput) EndIf EndFunc ;==>_Debug1 point -
Live Slider Control
reb reacted to somdcomputerguy for a topic
While this has no graphics or sliders for that matter, this bit of code affects the main volume on both Windows 7 and Vista PCs. I haven't tried this on one running XP. HotKeySet("{F2}", "VolUpDownMute") ;ToggleMute HotKeySet("{F3}", "VolUpDownMute") ;VolDown HotKeySet("{F4}", "VolUpDownMute") ;VolUp While 1 Sleep(100) WEnd Func VolUpDownMute() Switch @HotKeyPressed Case "{F2}" Send("{VOLUME_MUTE}") Case "{F3}" Send("{VOLUME_DOWN}") Case "{F4}" Send("{VOLUME_UP}") EndSwitch EndFunc1 point -
WELCOME To TheSaint's TOOLBOX DOWNLOAD SECTIONS can be reached quickly - scroll up from HERE (Post #2). However, if this is your first visit, then please pagedown past the News section below, and read the Disclaimer, Download Info, etc first. There are four titled download sections, in the following order - 1) AutoIt Tools, 2) Other Tools, 3) Utilities, 4) Games. Each section is arranged alphabetically by program name. ** Programs marked like this are in my new smaller package format. If you want to install them easily, with shortcuts, uninstall ability, etc then you will need to use my 'Universal Installer' program (now also available). However, they are only regular zip files that just contain an additional instruction file for that program. This new package format, is a new option in my 'Installer Creator v2.5' program (just updated). See latest NEWS. +============================================================+ || - MY IMPORTANT TOOLBOX ANNOUNCEMENTS & LATEST NEWS SECTION - || +============================================================+ * #104 #101 #100 #84 #81 #80 #78 #77 #76 #75 #74 #73 #72 #71 #70 #58 #57 #56 #55 #54 #53 #52 #49 #48 #47 #46 #45 #44 #43 #42 #41 #32 #31 #30 #29 #28 #27 #26 #24 #21 #20 #19 #18 #17 #16 #15 #14 #13 #9 #8 #7 * Above is my posts in order from latest to first (Latest are also in bold red below) The news index below, is only for those seeking further program information. +============================================================+ || Abbreviation Database - #72 #81 +===============================================+ || Admin File Management - #7 #71 +===============================================+ || Admin Rights - #7 #71 +===============================================+ || AutoIt Version Switcher - #17 #18 #32 #74 +===============================================+ || AVGBackup New - #73 +===============================================+ || AVGBackup Updater - #73 +===============================================+ || CDIni Database - #47 #77 #78 #84 +===============================================+ || Context Options - #13 +===============================================+ || Create Zip Within - #42 +===============================================+ || Declare All Variables - #16 #20 +===============================================+ || Dialog Maker - #9 +===============================================+ || DiscTray Control - #53 +===============================================+ || Folder From File - #27 +===============================================+ || Get CDPlayer Ini - #54 +===============================================+ || GUI Control Styler - #44 #45 #56 +===============================================+ || GUIBuilder - #74 +===============================================+ || Icon Browser - #13 #75 +===============================================+ || Installer Creator - #19 #21 #26 #45 #55 #75 #76 #101 +===============================================+ || Make It Pretty - #28 +===============================================+ || Msgbox Viewer - #8 +===============================================+ || Name Fix - #48 +===============================================+ || New Folders - #13 #24 #27 #48 +===============================================+ || Open Projects - #14 #41 #80 +===============================================+ || Path Duplicator - #45 +===============================================+ || Projects Backup - #8 #29 +===============================================+ || RGBColor Selector - #52 +===============================================+ || Search Assistant - #30 #43 +===============================================+ || SendTo Organiser - #27 +===============================================+ || SetAs Wallpaper - #80 #104 +===============================================+ || Shortcuts For All - #7 +===============================================+ || Shutdown Options - #48 +===============================================+ || Simple CDPlayer - #78 +===============================================+ || Tall Tales - #49 #57 #58 #70 +===============================================+ || Time Calculator - #45 +===============================================+ || Toolbar For Any - #15 +===============================================+ || Universal Installer - #45 #55 +===============================================+ || Update SciTE Values - #46 +===============================================+ || NEWS - #31 #55 #75 #100 +===============================================+ If you wish to discuss any of my programs in detail, and they have a separate Info (Topic) page, then please do that there. However, any generic comments, thanks, etc are welcome here. For various reasons, I've deemed it wiser to collect (Index) all my programs at this post - the simplest reason to give, is that most of my instructions, explanations, etc are pretty much identical, and so placing all that in one spot saves space - if I couple that with a date, then you can maybe jump to what you want and ignore my long ramble (if up-to-date with my latest info). Please don't pester me about some of the source code, read the NOTICE below and it will all be explained! PLEASE BE PATIENT, STILL UPDATING! You will eventually find all my AutoIt tools here and a link to their main pages (separate posts) for information about them and comments others and myself have made. DISCLAIMER! (last updated 16-09-2008) NOTICE! For the moment, I'm not including source code for any of my new programs that haven't been available at the Forum before. This is only an interim thing and done for a couple of reasons - 1) I want others to have a really good go at my programs, before others start modifying or incorporating them into their own and posting them (less feedback when that happens). 2) I really really want some feedback (as I've said above in the disclaimer). 3) With appropriate feedback, I can make changes that benefit all ... and maybe even discover some embarassments that I can remove ... before you get to see me naked (so to speak). I DO INTEND TO SUPPLY THE SOURCE CODE FOR ALL MY TOOLS - the more feedback (especially) I get and the more downloads, will make that sooner rather than later! NOTE! Some of the programs below are frontends only for a program made by someone else. DOWNLOAD & FILE INFORMATION * More information about my Installer and extracting can now be found here * Some of the Info links also lead to a download. (15-12-2008) ENJOY! 1. AUTOIT TOOLS Autoit Version Switcher v1.5 ** (updated 09-02-2009) AutoIt_Version_Switcher_Link.txt (197 kb) (Number of previous downloads: 80 odd + 85) Info (see Post #17 below) *(fixed) 9-10-2008 (see Post #18 #32 #74) Compile Options Info (also see ) Declare All Variables v1.2 Declare_All_Variables_Link.txt (0.99 Mb) (My latest program) (Number of previous downloads: 16) Info (also see Post #16 below) *(fixed) 12-10-2008 (see Post #20 below) Dialog Maker v1.8 Dialog_Maker_Link.txt (800 kb) Info (see Post #9 below) GuiBuilder v0.8 (my update to Cyberslug's program) ** (updated 09-02-2009) GuiBuilder_Link.txt (223 kb) (Support for newer AutoIt versions) (Number of previous downloads: 18) Info (For IMPORTANT Information see #74) GUI Control Styler v1.1 ** GUI_Control_Styler_Link.txt (220 kb) (Number of previous downloads: 30) Info (see Post #44 and #45 #56) (includes Screenshots) *(updated 22-12-2008) Icon Browser v1.2 Icon_Browser_Link.txt (902 kb) (Number of previous downloads: 208 + 168) (my update of the AutoIt example) Info (also see Post #13 #75) Installer Creator v2.7 ** (updated) 18-07-2009 Installer Creator Link.txt (454 kb) (Support for newer AutoIt versions) (Number of previous downloads: 323 + 203 + 221) See it's >own topic for latest update. Info (also see Post #19 and #21 and #45 #55 #75 #76 #101) Make It Pretty v1.5 Make_It_Pretty_Link.txt (891 kb) Info (also see Post #28 below) Msgbox Viewer v1.5 Msgbox_Viewer_Link.txt (855 kb) (Number of previous downloads: 286) Info (also see Post #8 below) Open Projects v1.8 ** (updated) 26-02-2009 Open_Projects_Link.txt (218 kb) (Number of previous downloads: 42 + 58) (Frontend for TrueCrypt drives for AutoIt project security) Info (see Post #14 below) (also Post #41 #80) Projects Backup v6.9 Projects_Backup_Link.txt (867 kb) (Number of previous downloads: 210 + 209 + 48) Info (also see Post #8 below) *(fixed) 22-10-2008 (see Post #29 below) RGBColor Selector v2.1 ** (added 20-12-2008) RGBColor_Selector_Link.txt (136 kb) (Number of previous downloads: 260 + 248) Info (also Info) (also see Post #52) Script Templates Info ToolBar For Any v2.2 ToolBar_For_Any_Link.txt (890 kb) Info (also see Post #15 below) Universal Installer v1.0 * (updated 16-12-2008) Universal_Installer_Link.txt (871 kb) (Number of previous downloads: 13) Info (also see Post #45 & #48 #55) Update SciTE Values v1.3 ** Update_SciTE_Values_Link.txt (216 kb) Info (see Post #46) (includes Screenshot) 2. OTHER TOOLS Admin File Management v1.1 (repackaged 23-01-2009) ** Admin_File_Management_Link.txt (198 kb) (Number of previous downloads: 562 + 175) Info (also see Post #7 below & #71) Admin Rights v4.3 (repackaged 23-01-2009) ** Admin_Rights_Link.txt (192 kb) (Number of previous downloads: 289 + 354 + 198) Info (also see Post #7 below & #71) Case Toggle Info (also see ) Change Case Info (also see ) Clipboard Joiner Info (also see ) Context Options v2.7 Context_Options_Link.txt (797 kb) (Number of previous downloads: 251) Info (also see Post #13 below) Create Zip Within v1.0 Create_Zip_Within_Link.txt (802 kb) Info (see Post #42 below) Date Shortcuts Info (also see ) Folder From File v1.6 Folder_From_File_Link.txt (894 kb) Info (see Post #27 below) Get Directory Listing Info (also see ) Name Fix v2.3 ** Name_Fix_Link.txt (199 kb) Info (see Post #48) (includes Screenshot) New Folders v3.6 ** (updated 16-12-2008) New_Folders_Link.txt (248 kb) (Number of previous downloads: 193 + 31 + 79) Info (also see Post #13 and #24 & #48) Path Duplicator v1.1 ** Path_Duplicator_Link.txt (214 kb) Info (see Post #45) (includes Screenshot) SendTo Organiser v1.2 SendTo_Organiser_Link.txt (880 kb) Info (see Post #27 below) Shortcuts For All v2.1 Shortcuts_For_All_Link.txt (789 kb) (Number of previous downloads: 303) Info (also see Post #7 below) StartUp Runner Info (also see ) TextFiles Joiner Info (also see ) Time Calculator v1.5 ** Time_Calculator_Link.txt (123 kb) (Number of previous downloads: 268 + 79) Info (also see Post #45) (includes Screenshot) Virtual Drive Info (also see ) 3. UTILITIES Abbreviation Database v2.9 (updated 04-03-2009) ** Abbreviation_Database_Link.txt (257 kb) (Number of previous downloads: 22) Info (see #72 #81) (includes Screenshots) Alert Timer Info (also see ) Author Updates & Database Viewer Info (also see ) AutoRunner Info (also see ) AVGBackup New v1.3 (new 27-01-2009) ** AVGBackup_New_Link.txt (193 kb) Info (important you read Post #73) AVGBackup Updater v1.4 (new 27-01-2009) ** AVGBackup_Updater_Link.txt (191 kb) Info (important you read Post #73) Camera Transfer Info (also see ) CDIni Database v3.6 (updated 09-03-2009) ** CDIni_Database_Link.txt (347 kb) (Number of previous downloads: 5 + 26 + 5 + 7) (New Features, Bugfixes, etc) Info (also see Post #47 & #48 #77 #78 #84) DiscTray Control v3.2 ** DiscTray_Control_Link.txt (212 kb) Info (also see Post #53) DvdA2Wav Info (also see ) Encrypted Text Reader Info (also see ) Enter Serial Info (also see ) Export To Nero Info (also see ) Fix Taskbar Info (also see ) Get CDPlayer Ini v1.2 ** Get_CDPlayer_Ini_Link.txt (215 kb) Info (see Post #54) (includes Screenshot) Iconoid Check Info (also see ) If Not Pressed Info (also see ) Internet Connection Info (also see ) Irfan Slideshow Info (also see ) Kill At Startup Info (also see ) Lplex GUI Info (also see ) M3UPath Editor Info (also see ) MediaRenamer Info (also see ) Nero Data Burn Info (also see ) Numerals To Numbers Info (also see ) Photo Renamer Info (also see ) Program Runner Info (also see ) Rename Long Filename Info (also see ) Resolution Start Info (also see ) Save Separate Tracks Info (also see ) Search Assistant v1.4 *(updated 30-11-2008) Search_Assistant_Link.txt (818 kb) (Number of previous downloads: 25) Info (also see Post #30 below)(see Post #43 below) SetAs Wallpaper v4.3 ** (Updated 15-12-2009) (Requires IrfanView for Jpegs) SetAs Wallpaper Link.txt (240 kb) (Number of previous downloads: 66) Info (see #80 #104) Shutdown Options v6.4 ** Shutdown_Options_Link.txt (910 kb) Info (also see Post #48) Simple CDPlayer v1.3 ** (NEW 18-02-2009) Simple_CDPlayer_Link.txt (216 kb) (Number of previous downloads: 282) Info (also see Post #78) Text Shuffle Info (also see ) Track To Graphic Info (also see ) Web Unzipper + Web Zipper Info (also see ) Wipe Recent Info (also see ) Wipe History Info (also see ) 4. GAMES Question Master (aka Code Breaker) Info (also see ) Tall Tales v1.5 (NEW) ** Tall_Tales_Link.txt (230 kb) Info (see Post #49 & #57 #58 #70) The Fantasy Realm (work in progress) Info1 point
-
SMF - The fastest duplicate files finder... [Updated 2024-Oct-20]
ffibestsolution reacted to KaFu for a topic
You're welcome, glad you like the program .1 point -
SMF - The fastest duplicate files finder... [Updated 2024-Oct-20]
ffibestsolution reacted to 131738 for a topic
thank you1 point -
Control Panel Applets - Shortcuts and Scripts Using Control.exe The parameter @m is used for files with more than one basic function and starts with zero, which is the default value if no parameter is used. For example, main.cpl controls both mouse and keyboard properties. Thus, either the command control main.cpl or control main.cpl,@0 would open the mouse properties. To open the keyboard properties the command would be control main.cpl,@1 The second set of optional parameters "n" can be used when a dialog box is tabbed. A number of the values are given in Table I. For example, the default window when the mouse properties dialog is opened is the "Buttons" tab. To open the"Pointer Options" tab (third on the list) the command would be control main.cpl,@0,2 Note that here the index "n" is zero-based so the third tab has an index of 2. Many control panel files have only one main page and the "@m" index can be omitted. In that case, to open a particular tab requires two commas between the file name and the tab index. For example, the dialog box for System Properties has a number of tabs as listed in the table above. A specific one of these can be opened by adding a parameter so that the command reads control.exe sysdm.cpl,,n where "n" is an integer running from 0 to 6 corresponding to the 7 tabs listed in Table I. Unfortunately, Microsoft is not consistent in how it indexes tabs. For example, when using access.cpl, the tabs run from 1 to 5 instead of beginning with zero. Some files can only be opened at a few tabs or only at the beginning tab. For instance, Power Options has four tabs but they are not accessible with an index. The only way to find out what system applies to a particular file seems to be trial and error. Also note that the numbering of tabs for many files is not the same in Windows XP as it was in Windows 98/Me. Also, at least one change was made in Windows XP SP2. ; http://support.microsoft.com/default.aspx?scid=kb;EN-US;135068 ; Some Control Panel Applet Files ; ------------------------------- ; access.cpl Accessibility controls Keyboard(1), Sound(2), Display(3), Mouse(4), General(5) ; appwiz.cpl Add/Remove Programs ; desk.cpl Display properties Themes(5), Desktop(0), Screen Saver(1), Appearance (2), Settings(3) ; hdwwiz.cpl Add hardware ; inetcpl.cpl Configure Internet Explorer and ; Internet properties General(0), Security(1), Privacy(2), Content(3), Connections(4), Programs(5), Advanced(6) ; intl.cpl Regional settings Regional Options(1), Languages(2), Advanced(3) ; joy.cpl Game controllers ; main.cpl Mouse properties and settings Buttons(0), Pointers(1), Pointer Options(2), Wheel(3), Hardware(4) ; main.cpl,@1 Keyboard properties Speed(0), Hardware (1) ; mmsys.cpl Sounds and Audio Volume(0), Sounds(1), Audio(2), Voice(3), Hardware(4) ; ncpa.cpl Network properties ; nusrmgr.cpl User accounts ; powercfg.cpl Power configuration Power Schemes, Advanced, Hibernate, UPS (Tabs not indexed) ; sysdm.cpl System properties General(0), Computer Name(1), Hardware(2), Advanced(3), System Restore(4), ; Automatic Updates(5), Remote (6) ; telephon.cpl Phone and modem options Dialing Rules(0), Modems(1), Advanced(2) ; timedate.cpl Date and time properties Date & Time(0), Time Zone(1), Internet Time (no index) ; date/time.cpl Launches the Date and Time Properties window ; desktop.cpl Launches the Display Properties window ; color.cpl Launches the Display Properties window with the Appearance tab preselected ; ; Note that some CPL files are multi-functional and require additional parameters to invoke the various functions. ; Parameters use the "@" sign and a zero-based integer. ; Syntax : control somefile.cpl,<optional arguments> Run("control.exe sysdm.cpl,,4") Using these shortcuts you need to use LESS send() commands in your script to access the CTRL panels. Enjoy !! ptrex1 point
-
Transparent InputBox
arthalita01 reacted to Joke758 for a topic
Yes I am talking about a input box in a GUI... GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) doesn't work..1 point -
i really don understand what there are for why not just use a single variable1 point
-
Global is for outside functions which is visible from anywhere in the script. Local is for inside functions which is visible within the function only and is destroyed when the function completes. Dim is for inside functions which can be visible as either of the above depending on if Global scope is declared, else Local is used. This prevents a script from crashing and allows the function to continue with the knowledge that the value is empty and can be handled as such. Without Dim, then variables would need to use IsDeclared for each variable upon which several varaibles would be a pain in the butt. Example of Scope shown test0() ; Global $var not Declared (Dim inside function avoids crash) testisd() ; Global $var not Declared (IsDeclared inside function avoids crash (As without Dim ???)) Global $var = 'Global'; Global $var Declared (Only Global is needed outside functions) test1() ; Global $var & Local $var Declared (Local used within function) test2() ; Global $var & Dim $var Declared (Dim used as Global as Global is Declared) MsgBox(0, 'Global', '" ' & $var & ' "') Func test0() Dim $var MsgBox(0, 'Dim (No Global)', 'Value: " ' & $var & ' "') EndFunc Func testisd() If Not IsDeclared('var') Then Local $var MsgBox(0, 'IsDelared (No Global)', 'Value: " ' & $var & ' "') EndFunc Func test1() Local $var = 'Local (Global Declared)' MsgBox(0, 'Local', 'Value: " ' & $var & ' "') EndFunc Func test2() Dim $var MsgBox(0, 'Dim (Global Declared)', 'Value: " ' & $var & ' "') EndFuncI use scope as mentioned above and find Dim as an important scope to make dynamically created scripts work correctly without error. If you use Dim or Local outside functions then you are not using scope correctly. Edit: ouch, changed incorrectly to correctly1 point
-
Local,global,dim,
onlineth reacted to greenmachine for a topic
Ok this might take some explaining, so I'm making it a new post. Basically I just created a lot of variables in various scopes and added to them, and then tried to check them when I was done adding. The thing is, most of the "more stuff" message boxes are going to have Au3Check errors because the vars don't exist (the point of the exercise). So... Global is global (used throughout the script) no matter where you put it (which is why you should always just put them at the top). Local, when used in the main portion of the script, is the same as global. When used inside a function, it disappears when the function is ended. Dim, when used in the main portion of the script, is also the same as global. When used inside a function on an existing variable, it is the same as simply modifying the variable (the same scope as the original is used). If it does not already exist, it is created with local scope, which means that it won't be able to be accessed outside the function. For loops use local scope as well (in the first one, local is the same as global, because it is in the main - in the second one, it is local function scope). Global $GlobalVar = 3, $DimThisVar = 9 Local $LocalVar1 = 6 Dim $DimVar = 7 For $i = 1 To 10 MsgBox (0, "vars in loop " & $i, "GlobalVar = " & $GlobalVar & @CRLF & "LocalVar1 = " & $LocalVar1 & @CRLF & "DimVar = " & $DimVar) $GlobalVar += 1 $LocalVar1 += 1 $DimVar += 1 Next MsgBox (0, "$i = " & $i, "GlobalVar = " & $GlobalVar & @CRLF & "LocalVar1 = " & $LocalVar1 & @CRLF & "DimVar = " & $DimVar) TestFuncForVars() MsgBox (0, "after func", "GlobalVar = " & $GlobalVar & @CRLF & "LocalVar1 = " & $LocalVar1 & @CRLF & "DimVar = " & $DimVar) MsgBox (0, "more stuff 1", "j = " & $j) MsgBox (0, "more stuff 2", "LocalVar2 = " & $LocalVar2) MsgBox (0, "more stuff 3", "DimVar2 = " & $DimVar2) MsgBox (0, "more stuff 4", "DimThisVar = " & $DimThisVar) Func TestFuncForVars() Local $LocalVar2 = 1 Dim $DimVar2 = 3 Dim $DimThisVar = 1 For $j = 1 To 10 $GlobalVar += 1 $LocalVar1 += 1 $LocalVar2 += 1 $DimVar += 1 $DimVar2 += 1 $DimThisVar += 1 Next EndFunc1 point -
Local,global,dim,
onlineth reacted to greenmachine for a topic
I'm going to post a test script in a minute, but before I do I want to say this: Dim is really not necessary, and gets unnecessarily confusing if you don't know what you're doing.1 point -
can you give me an example with using it in a script1 point
-
Local,global,dim,
onlineth reacted to greenmachine for a topic
Global and Local are types of scope. Global scope means that the variable declared will be able to be accessed and edited by every line in the script. Local scope means that the variable can only be used in the current scope (Funcs, for loops, etc). The Dim keyword takes into account the scope of the variable before creating it. If it was not defined before, it becomes a local variable. If it was defined before, it re-uses the global variable. These keywords aren't variables. Only something that starts with $ is a variable (for this purpose).1 point