Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/01/2015 in all areas

  1. Melba23

    Signatures

    Hi, The latest forum upgrade seems to have completely messed up some complex signatures - please check yours to make sure it is still as you want it to appear. And can I take this opportunity to remind you all that sigs should not be too large (think of using a spoiler to hide text walls) nor advertise external products. Be prepared to find them edited if we think they do not meet these requirements. M23
    2 points
  2. When you can click on this link and see the text.. http://test.com/list.txt Only then can the program see it 8) PS Just noticed that test.com is ( https )
    1 point
  3. DarkwarlorD

    Regadd

    Next time try to follow the examples. ; Write a REG_DWORD value RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\MMC\FX:{b05566ac-fe9c-4368-be02-7a4cbb7cbe11}", "Restrict_Run", "REG_DWORD", "00000001")
    1 point
  4. Yeah, but that is the point usually if your an Admin is to have access to everything. Now if a corporation is setup where users have Admin rights, thats bad on them. If I had to go the way of encryption I would probably just keep my scripts on a thumbdrive with bitlocker.
    1 point
  5. Example how to automate the Page Setup dialog of Notepad: Run("notepad.exe") WinWait("[CLASS:Notepad]", "") WinMenuSelectItem("[CLASS:Notepad]", "", "&File", "Page Set&up...")
    1 point
  6. jchd

    Validate Date (dd.mm.yyyy)

    Here's my try:
    1 point
  7. I have added some more examples: Data stored in fixed-length record files.An example where $LVN_ODCACHEHINT messages are used to extract data directly from a fixed-length record file into an array cache by setting the file pointer to the current record and reading the required number of bytes. Sorting rows in a virtual listview.$LVN_ODFINDITEM notifications.Used to find a row when you press one or a few keys on the keyboard. Using standard listviews.If not more than 10,000 rows have to be inserted in a listview, a standard listview should be used. An example shows how you can quickly fill a listview with native commands. Another example shows how you can quickly fill a listview from an inifile. More information and new zip in first post.
    1 point
  8. #Include <StructureConstants.au3> #Include <Date.au3> Func _NTP_FT($sServer, $fLocal = True) ;~ http://book.itep.ru/4/44/sntp4416.htm Local $tNTP = DllStructCreate('byte Header[4];byte RootDelay[4];byte RootDispersion[4];byte ReferenceIdentifier[4];byte ReferenceTimestamp[8];byte OriginateTimestamp[8];byte ReceiveTimestamp[8];byte TransmitTimestamp[8];byte KeyIdentifier[4];byte MessageDigest[16]') Local $tPacket = DllStructCreate('byte Packet[68]', DllStructGetPtr($tNTP)) Local $bPacket = 0, $tFT, $tQW, $aSocket, $aResult ;~ 0x1B000000 = 00011011 00000000 00000000 00000000b (LI = 00b VN = 011b Mode = 011b Stratum = 00000000b Poll = 00000000b Precision = 00000000b) $tNTP.Header = Binary('0x1B000000') UDPStartup() If @Error Then Return SetError(1, 0, 0) EndIf $aSocket = UDPOpen(TCPNameToIP($sServer), 123) If @Error Then ; Nothing Else UDPSend($aSocket, $tPacket.Packet) If @Error Then ; Nothing Else While 1 $bPacket = UDPRecv($aSocket, 68, 1) If (@Error) Or ($bPacket) Then ExitLoop EndIf Sleep(100) WEnd EndIf EndIf UDPCloseSocket($aSocket) UDPShutdown() If Not $bPacket Then Return SetError(2, 0, 0) EndIf $tFT = DllStructCreate($tagFILETIME) If $fLocal Then $tQW = DllStructCreate('uint64 Timestamp') Else $tQW = DllStructCreate('uint64 Timestamp', DllStructGetPtr($tFT)) EndIf $tPacket.Packet = $bPacket $tQW.Timestamp = Dec(StringMid(DllStructGetData($tNTP, 'TransmitTimestamp'), 3, 8), 2) * 10000000 + 94354848000000000 If $fLocal Then $aResult = DllCall('kernel32.dll', 'bool', 'FileTimeToLocalFileTime', 'struct*', $tQW, "struct*", $tFT) If (@Error) Or (Not $aResult[0]) Then Return SetError(3, 0, 0) EndIf EndIf Return $tFT EndFunc ;==>_NTP_FT $tFT = _NTP_FT('pool.ntp.org') ConsoleWrite(_Date_Time_FileTimeToStr($tFT) & @CRLF)
    1 point
  9. Yes, Just before you posted Thanks, and it works. :-)
    1 point
  10. haha... yes, jesus, I just figured that out. Trivial. Thanks a bundle, though
    1 point
  11. The FileSelectFolder function does not appear to display the files in the selected directory. I found many different examples of other FileSelectFolder functions, some by Melba23, which are way cool but not quite what I need. If the standard FileSelectFolder just displayed the files in the currently selected directory I could move on. Problem is the user might not know where the files they want to process are located. A possible solution is to display directories with files and either allow the user to select all the .bat files to copy to an array or just automatically copy all .bat files into the array. Some of you like to know the "why" of things: This entire exercise is to copy / rename a single file.txt to the same name as the .bat filenames in the selected dir. File1.bat File2.bat File3.bat Copy TestFile.txt to: File1.txt File2.txt File3.txt so there are both .bat and .txt files for each .bat filename. The user must decide which directory they want to process, and needs to see what's in the directory to select it. Doesn't matter if it's the standard Explorer window or a custom explorer. If you know of one I could try I'd certainly appreciate it! Thanks in advance! Jibs
    1 point
  12. OK, so after all that messing around with API calls, deleting the ProgressBar to Reset the Marquee effect plus more ... all it actually took was just setting the GUICtrlSetStyle() again! I was inspired by >this post to re-evaluate the code and found this little trick with GUICtrlSetStyle()! I suppose I shouldn't be disappointed at least I learnt from this experience Simple Marquee Progress: #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> Example() Func Example() Local $hGUI = GUICreate('Marquee ProgressBar', 300, 90) Local $iProgressBar = GUICtrlCreateProgress(10, 10, 280, 20, $PBS_MARQUEE) ; Create a progressbar using the marquee style Local $iStart = GUICtrlCreateButton('Start', 30, 60, 85, 25) Local $iStop = GUICtrlCreateButton('Stop', 120, 60, 85, 25) Local $iReset = GUICtrlCreateButton('Stop && Reset', 210, 60, 85, 25) GUISetState(@SW_SHOW, $hGUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iStart _ProgressMarquee_Start($iProgressBar) ; Start the marquee effect Case $iStop _ProgressMarquee_Stop($iProgressBar) ; Stop the marquee effect Case $iReset _ProgressMarquee_Stop($iProgressBar, True) ; Stop the marquee effect and reset the progressbar EndSwitch WEnd ; Tidy resources GUIDelete($hGUI) EndFunc ;==>Example ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ProgressMarquee_Start ; Description ...: Start the marquee effect ; Syntax ........: _ProgressMarquee_Start($iControlID) ; Parameters ....: $iControlID - ControlID of a progressbar using the $PBS_MARQUEE style ; Return values .: Success - True ; Failure - False ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _ProgressMarquee_Start($iControlID) Return GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, True, 50) EndFunc ;==>_ProgressMarquee_Start ; #FUNCTION# ==================================================================================================================== ; Name ..........: _ProgressMarquee_Stop ; Description ...: Stop the marquee effect ; Syntax ........: _ProgressMarquee_Stop($iControlID[, $bReset = False]) ; Parameters ....: $iControlID - ControlID of a progressbar using the $PBS_MARQUEE style ; $bReset - [optional] Reset the progressbar, True - Reset or False - Don't reset. Default is False ; Return values .: Success - True ; Failure - False ; Author ........: guinness ; Example .......: Yes ; =============================================================================================================================== Func _ProgressMarquee_Stop($iControlID, $bReset = False) Local $bReturn = GUICtrlSendMsg($iControlID, $PBM_SETMARQUEE, False, 50) If $bReturn And $bReset Then GUICtrlSetStyle($iControlID, $PBS_MARQUEE) EndIf Return $bReturn EndFunc ;==>_ProgressMarquee_Stop
    1 point
×
×
  • Create New...