Leaderboard
Popular Content
Showing content with the highest reputation on 08/27/2019 in all areas
-
Control Viewer (mod.)
robertocm reacted to argumentum for a file
Version 0.2024.9.16
8,223 downloads
This is @Yashied's most excellent control viewer, modified by me, based on the code @boomingranny posted. There are 2 forum entries, one shows active and the other depreciated, and not seen @Yashied since March 2016, so I feel is OK to post this, tho, i'd take it down upon request. PS: Do run as Admin if available, as it may not do what you need without the rights.1 point -
Which programming language deserves to be learned?
Earthshine reacted to FrancescoDiMuro for a topic
@jchd, @Earthshine Reading all these stuffs wrote a while back, let me say you a sincere "Thank you" for all your effort in this (and all the other) thread(s)1 point -
Creating a Array From GUICtrlCreateInput Problems
FrancescoDiMuro reacted to Jos for a topic
@ToastyScripter, I do not see anything wrong or untrue in the answer @BrewManNH gave so when you aren't prepared for an honest answer you better don't ask the question in stead of reporting it. Jos1 point -
May be an unpopular opinion but I love the Static keyword... Optimised _StringRandom Global $hTimer For $i = 1 to 10 $hTimer = _Timer_Init() _StringRandom(20, 4) ConsoleWrite($i & ": " & _Timer_Diff($hTimer) & @CRLF) Next ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; For $i = 1 to 10 $hTimer = _Timer_Init() _StringRandom2(20, 4) ConsoleWrite($i & ": " & _Timer_Diff($hTimer) & @CRLF) Next ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StringRandom ; Description ...: Returns a string of random characters ; Syntax ........: _StringRandom($iAmount[, $iType = 1]) ; Parameters ....: $iAmount - an integer value. Length of returned string ; $iType - [optional] an integer value. Default is 1. ; 1 - Return digits (0 - 9) ; 2 - Return hexadecimal (0 - 9, A - F) ; 3 - Return Alphanumeric upper (0 - 9, A - Z) ; 4 - Return Alphanumeric (0 - 9, A - Z, a - z) ; 5 - Return Alpha upper (A - Z) ; 6 - Return Alpha (A - Z, a - z) ; Return values .: Success - String ; Failure - Empty string and @error flag as follows: ; @error : 1 - $iAmount is not a positive integer ; 2 - $iType is out of bounds ; Author ........: Sam Coates ; =============================================================================================================================== Func _StringRandom($iAmount, $iType = 1) If $iAmount < 1 Or IsInt($iAmount) = 0 Then Return(SetError(-1, 0, "")) Local $sString = "" Local $iRandom = 0, $iRandomLow = 1, $iRandomHigh = 62 Local $aCharId[63] If $iType = 1 Then ;; digits: 1 - 10 $iRandomHigh = 10 ElseIf $iType = 2 Then ;; hexadecimal: 1 - 16 $iRandomHigh = 16 ElseIf $iType = 3 Then ;; alnumupper: 1 - 36 $iRandomHigh = 36 ElseIf $iType = 4 Then ;; alnum: 1 - 62 $iRandomHigh = 62 ElseIf $iType = 5 Then ;; alphaupper: 11 - 36 $iRandomLow = 11 $iRandomHigh = 36 ElseIf $iType = 6 Then ;; alpha: 11 = 62 $iRandomLow = 11 $iRandomHigh = 62 Else Return(SetError(-2, 0, "")) EndIf For $i = 1 To 10 ;; loop through our array, assigning ascii values to each element $aCharId[$i] = Chr(47 + $i) Next For $i = 11 to 36 $aCharId[$i] = Chr(54 + $i) Next For $i = 37 To 62 $aCharId[$i] = Chr(60 + $i) Next For $i = 1 To $iAmount $iRandom = Random($iRandomLow, $iRandomHigh, 1) ;; random interger between $iRandomLow and $iRandomHigh $sString &= $aCharId[$iRandom] ;; append string with corresponding character from ascii array Next Return ($sString) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _StringRandom ; Description ...: Returns a string of random characters ; Syntax ........: _StringRandom($iAmount[, $iType = 1]) ; Parameters ....: $iAmount - an integer value. Length of returned string ; $iType - [optional] an integer value. Default is 1. ; 1 - Return digits (0-9) ; 2 - Return hexadecimal (0-9, A - F) ; 3 - Return Alphanumeric upper (0-9, A - Z) ; 4 - Return Alphanumeric (0-9, A - Z, a - z) ; 5 - Return Alpha upper (A - Z) ; 6 - Return Alpha (A - Z, a - z) ; Return values .: Success - String ; Failure - Empty string and @error flag as follows: ; @error : 1 - $iAmount is not a positive integer ; 2 - $iType is out of bounds ; Author ........: Sam Coates ; =============================================================================================================================== Func _StringRandom2($iAmount, $iType = 1) If $iAmount < 1 Or IsInt($iAmount) = 0 Then Return(SetError(-1, 0, "")) Local $sString = "" Local $iRandomLow = 1, $iRandomHigh = 62 Local Static $aCharId[63] = [0, Chr(48), Chr(49), Chr(50), Chr(51), Chr(52), Chr(53), Chr(54), Chr(55), Chr(56), Chr(57), Chr(65), Chr(66), _ Chr(67), Chr(68), Chr(69), Chr(70), Chr(71), Chr(72), Chr(73), Chr(74), Chr(75), Chr(76), Chr(77), Chr(78), _ Chr(79), Chr(80), Chr(81), Chr(82), Chr(83), Chr(84), Chr(85), Chr(86), Chr(87), Chr(88), Chr(89), Chr(90), _ Chr(97), Chr(98), Chr(99), Chr(100), Chr(101), Chr(102), Chr(103), Chr(104), Chr(105), Chr(106), Chr(107), _ Chr(108), Chr(109), Chr(110), Chr(111), Chr(112), Chr(113), Chr(114), Chr(115), Chr(116), Chr(117), Chr(118), _ Chr(119), Chr(120), Chr(121), Chr(122)] If $iType = 1 Then ;; digits: 1 - 10 $iRandomHigh = 10 ElseIf $iType = 2 Then ;; hexadecimal: 1 - 16 $iRandomHigh = 16 ElseIf $iType = 3 Then ;; alnumupper: 1 - 36 $iRandomHigh = 36 ElseIf $iType = 4 Then ;; alnum: 1 - 62 $iRandomHigh = 62 ElseIf $iType = 5 Then ;; alphaupper: 11 - 36 $iRandomLow = 11 $iRandomHigh = 36 ElseIf $iType = 6 Then ;; alpha: 11 = 62 $iRandomLow = 11 $iRandomHigh = 62 Else Return(SetError(-2, 0, "")) EndIf For $i = 1 To $iAmount $sString &= $aCharId[Random($iRandomLow, $iRandomHigh, 1)] ;; append string with corresponding character from ascii array Next Return ($sString) EndFunc Old: 1: 0.380358214711124 2: 0.379736206183387 3: 0.343037703046909 4: 0.323755438687064 5: 0.359520929031937 6: 0.345214732893988 7: 0.35485586507391 8: 0.319401378992906 9: 0.331841549547644 New: 1: 0.465262378747213 2: 0.133731833463437 3: 0.12502371407512 4: 0.439138020582262 5: 0.125956726866725 6: 0.123779697019646 7: 0.124090701283515 8: 0.119736641589356 9: 0.1212916629086981 point
-
Methods for ObjCreateInterface()
FrancescoDiMuro reacted to Bilgus for a topic
generally you get it from the object documentation, a com viewer, or in some cases from header files, idl files (typelibs) I'll assume you already saw the example in the helpfile but here it is again Example() Func Example() ; Declare the CLSID, IID and interface description for ITaskbarList. ; It is not necessary to describe the members of IUnknown. Local Const $sCLSID_TaskbarList = "{56FDF344-FD6D-11D0-958A-006097C9A090}" Local Const $sIID_ITaskbarList = "{56FDF342-FD6D-11D0-958A-006097C9A090}" Local Const $sTagITaskbarList = "HrInit hresult(); AddTab hresult(hwnd); DeleteTab hresult(hwnd); ActivateTab hresult(hwnd); SetActiveAlt hresult(hwnd);" ; Create the object. Local $oTaskbarList = ObjCreateInterface($sCLSID_TaskbarList, $sIID_ITaskbarList, $sTagITaskbarList) ; Initialize the iTaskbarList object. $oTaskbarList.HrInit() ; Run Notepad. Run("notepad.exe") ; Wait for the Notepad window to appear and get a handle to it. Local $hNotepad = WinWait("[CLASS:Notepad]") ; Tell the user what to look for. MsgBox($MB_SYSTEMMODAL, "", "Look in the Taskbar and you should see an entry for Notepad." & @CRLF & @CRLF & "Press OK to continue.") ; Delete the Notepad entry from the Taskbar. $oTaskbarList.DeleteTab($hNotepad) ; Tell the user to look again. MsgBox($MB_SYSTEMMODAL, "", "Look in the Taskbar. There should no longer be a Notepad entry but Notepad is still running." & @CRLF & @CRLF & "Press OK to continue.") ; Close Notepad. WinClose($hNotepad) EndFunc ;==>Example https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/nn-shobjidl_core-itaskbarlist MSDN is kinda junk for anything beyond verifying you have the correct methods and finding the name of the header file since it doesn't give you the proper order or any of the clsids shobjidl_core.h -- https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ ;;getting closer but still not what we need Ahh here we go! https://github.com/tpn/winsdk-10/blob/9b69fd26ac0c7d0b83d378dba01080e93349c2ed/Include/10.0.16299.0/um/ShObjIdl_core.idl#L4635 Now note we got lucky that MS published the sources a decent com viewer is invaluable but doesn't always work Doesn't look like the website is still around but Japheth has a not so bad com viewer https://www.softpedia.com/get/System/System-Info/COMView.shtml#sgal_0 [edit] wayback machine to the rescue https://web.archive.org/web/20140830145525/http://japheth.de/ https://web.archive.org/web/20140614155346fw_/http://www.japheth.de/COMView.html maybe others can point you to some of their favorite COM viewers oh and another place to find some info on obscure interfaces are Visual Basic forums (typically vb6) since thats where OLE/COM pretty much originated1 point -
Version 1.2
30,231 downloads
I wrote an introductory text for new programmers to learn how to code using AutoIt. It follows along with the help file for the most part – but provides additional context and attempts to connect all the information in a cohesive way for someone without any programming experience. I find the help file to be an AMAZING resource and the text I wrote in no way reflects any opinion to the contrary. Rather, it was created from the perspective of someone who struggled early on with the most basic concepts and thought that a hand-holding guide could be useful. I was also inspired by code.org who is trying to encourage people to learn to code. I thought – what better way than to use free tools that you can download at any time with access to an amazing community? If only there was a guide to walk people through it … Full discussion about the file can be found here: https://www.autoitscript.com/forum/topic/174205-introductory-learn-to-program-text-using-au3/1 point -
How do I force numeric comparison (Solved)
FrancescoDiMuro reacted to jchd for a topic
Your logic is flawed. If I understand your context correctly, the value you're reading comes from the control id 2865 and you want to count 5 s starting from when the read value is within $LowVac and $HiVac. Is that a correct description? Your code tests $value < $low AND $value > $high which isn't possible, provided $low <= $high.1 point -
'Connected Standby' Support
VenusProject2 reacted to ModemJunki for a topic
Hmmm... https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-wake-sources Quick and dirty test - schedule a mouse move or keypress script? ; -------------------------------------------------- ; Move mouse, then put it back back ; -------------------------------------------------- Func _MoveMouse($PixX=1, $PixY=1,$Speed=5) Local $pos = MouseGetPos() MouseMove($pos[0] + $PixX, $pos[1] + $PixY, $Speed) MouseMove($pos[0], $pos[1], $Speed) EndFunc ;==> _MoveMouse1 point -
Some Graphical Examples using GDI+ Vol. II
ShakibHasan reacted to UEZ for a file
1 point -
PixelSearch/PixelGetColor not working
LeoSS reacted to DrunkenDonkey for a topic
No, game is fullscreen sadly, I have tried: Opt("CaretCoordMode", 2) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 2) ;1=absolute, 0=relative, 2=client to every possible option and still got 0000000 as color. I have downloaded AutoHotkey and tested his similar function which have 3 possible ways to operate, all 3 returned 0 too. It looks windows 7's directx is doing something bad. I have heard that it supports 10-bit colors, maybe that's the reason? I guess only some of the developers can answer1 point