Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/26/2012 in all areas

  1. Or use ConsoleWrite(_ExpandEnvironmentStrings('%SystemDrive%/TESTME.txt') & @CRLF) Func _ExpandEnvironmentStrings($string) $a_Call = DllCall('kernel32.dll', 'int', 'ExpandEnvironmentStringsW', 'wstr', $string, 'wstr', '', 'dword', 32768) if @error Or Not $a_Call[0] Then Return SetError(1, 0, $string) Return $a_Call[2] EndFunc
    1 point
  2. Hey there Solarlight, Glad to hear that the script was of help. You can definitely put a timeout into the InputBox. Just update that line of code to read as follows: $strPassword = InputBox("Security Check", "Enter your password.", "", "*", "","","","",#####) and simply replace the ##### with the number of seconds before it times out. On a timeout, it will cause $strPassword != "password" and thus lock the flash drive. If you are looking to store sensitive data on the drive, however, I'd recommend looking into a freeware app called TrueCrypt which is capable of creating an encrypted storage space on your flashdrive that you can use. It would require you to enter a password to open the protected portion of the flash drive, and if someone tried to examine the data without first decrypting it, all they would see is nonsensical garbage text.
    1 point
  3. guinness

    MsgBox() with scrollbar

    This? I believe I found it ages ago by Yashied Rover, though didn't save the URL link. #include <APIConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPIEx.au3> ; www.autoitscript.com/forum/topic/98712-winapiex-udf/ Example() Func Example() Local $hGUI = _GUICreate_NoIcon("_GUICreate_NoIcon()") GUICtrlCreateLabel("Example Label", 10, 10, 150, 25) GUISetState(@SW_SHOW, $hGUI) While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop EndIf WEnd GUIDelete($hGUI) EndFunc ;==>Example Func _GUICreate_NoIcon($sTitle = "", $iWidth = -1, $iHeight = -1, $iXpos = -1, $iYpos = -1) Local $hGUI = GUICreate($sTitle, $iWidth, $iHeight, $iXpos, $iYpos, BitOR($WS_CAPTION, $WS_SYSMENU), $WS_EX_DLGMODALFRAME) Local $hIcon = _WinAPI_GetClassLongEx($hGUI, $GCL_HICON) _WinAPI_DestroyIcon($hIcon) _WinAPI_SetClassLongEx($hGUI, $GCL_HICON, 0) _WinAPI_SetClassLongEx($hGUI, $GCL_HICONSM, 0) Return $hGUI EndFunc ;==>_GUICreate_NoIcon
    1 point
  4. Skitty

    add to registry

    There are ways to make the script work on both architectures, research a little, it's not too hard to do. Correction: It's not hard at all. Just make sure you use the right base key depending on the interpreter architecture and the machines architecture. Func _CheckBaseKey($HKType) Local $CHECK = False If (@OSArch <> "X86") And @AutoItX64 Then If Number(StringTrimLeft($HKType, StringLen($HKType) - 2)) <> 64 Then #cs Jon once said somewhere that if running a compiled autoit script with an x86 interpreter the x64 OS will manually correct the key destination unless running with the x64 interpreter the system will assume the destination is correct, so just in case, we will attempt a correction manually in this area just for the heck of it.. Also note: If no match is found, we will throw an error because this shouldn't be written anywhere else. #ce Local Const $KeyVal[4][2] = [ _ ["HKCU", "HKCU64"], _ ["HKLM", "HKLM64"], _ ["HKEY_LOCAL_MACHINE", "HKEY_LOCAL_MACHINE64"], _ ["HKEY_CURRENT_USER", "HKEY_CURRENT_USER64"] _ ] For $I = 0 To UBound($KeyVal, 1) - 1 If StringInStr($KeyVal[$I][0], $HKType, 2) Then $HKType = $KeyVal[$I][1] $CHECK = True ExitLoop EndIf Next If Not $CHECK Then Return SetError(1, 0, False) EndIf EndIf Return SetError(0, 0, $HKType) EndFunc ;==>_CheckBaseKey
    1 point
  5. Valik

    Latest Beta

    Yes, I intend to release a fully broken beta. /facepalm
    1 point
  6. It's a cool example ! Thanks to share.
    1 point
  7. Valik

    Asking for source

    This is regards to the much debated "asking for source" topic. Until further notice, here's how it works. You ask for the source to somebodies script or say something along the lines "no source, I'm not running it" you are going to get a 3 day ban. If you don't want to run something because it doesn't have source code, fine, we don't care so don't post telling us about it. Remember, YOU do not make the rules on this forum. YOU do not dictate what can and can not be posted. YOU do not own the rights to people's work and YOU do not tell people what they can do with their intellectual property. People have the right to post scripts on this forum without posting the source. If you don't agree with that policy, well, too bad, nobody cares so keep it quiet. This is your warning. Violators will be shot, et cetera.
    1 point
×
×
  • Create New...