Jump to content

mannworks00

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by mannworks00

  1. RegRead is returning a blank or "" when it's unable to find a key. So, this worked for me in 2023 with Autoit v. 3.3.16.1. Func RegExists($path, $key) return (RegRead($path, $key) == "" ? False : True) EndFunc
  2. After testing various schemes (themes) in the settings for the newest SciTE editor (v. 4.1.2), I discovered that I wasn't able to fully reset it back to its original colors (See snapshot). Specifically, after applying the "__SciTE4AutoIt3_Dark ==> Dark SciTE4AutoIt3 Color scheme." The problem: The Line number column and the Output console do not reset back to their original colors. The Solution: Delete or edit the user config file. You can safely delete the config file because it will completely regenerate on SciTE restart- with it's factory (out of the box) color scheme. I also wrote a small script that will do it programatically: How to reset SciTE scheme in version 4.1.2.
  3. This script will reset SciTE's scheme back to its original form (fonts, colors, etc.) Local $path = @LocalAppDataDir&"\AutoIt v"&Floor(@AutoItVersion)&"\SciTE\" Local $SettingsFile = "SciTEUser.properties" ;ShellExecute($path); View local app data folder on windows 7 & Windows 10 ;Delete SciTEUser.properties (it will regenerate on SciTE restart) If FileDelete($path&$SettingsFile) <> 1 Then MsgBox(0,"","Could not delete "&$SettingsFile) Else MsgBox(0,"","Deleted "&$SettingsFile) EndIf #CS CAUTION Deleting this file will fully reset font size, type, etc to SciTE's original settings. If you don't want to lose those, you can edit the settings file manually: C:\Users\<user>\AppData\Local\AutoIt v3\SciTE\SciTEUser.properties #CE Exit
  4. Hey all, I know this code has been attempted before as a GUI app, and it would not copy text properly. Here is an updated version of the Google Search Shortcut Script from: Google Search Shortcut Script #Region #AutoIt3Wrapper_Outfile=shortcuts.exe #EndRegion #include <Clipboard.au3> Opt("TrayMenuMode", 3) Opt("TrayOnEventMode", 1) HotKeySet("{F1}", "_googleit") TraySetToolTip("Right click to exit") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_exit") While 1 Sleep(20) WEnd #cs _googleit() Source User: ViciousXUSMC https://www.autoitscript.com/forum/topic/177446-google-search-shortcut-script/?do=findComment&comment=1273519 #ce Source Func _googleit() Opt("WinTitleMatchMode", 2) ;Set Title Match To "Any Part of String" $sOldClip = ClipGet() ;Save Current Clipboard Send("^c") ;Copy Selected Text to Clipboard *before losing focus of current window WinActivate("Google Chrome", "") ; activate chrome ShellExecute("https://www.google.at/search?q=" & URLEncode(_ClipBoard_GetData())) ;Navigate to search ClipPut($sOldClip) ;Restore Old Clipboard Opt("WinTitleMatchMode", 1) ; Sets back to default EndFunc ;==>_googleit ;URL encoding is critical when doing string search queries via URL. #cs URLEncode Source User: Dhilip89 - UnicodeURL UDF https://www.autoitscript.com/forum/topic/46894-unicodeurl-udf/ #ce Func URLEncode($UnicodeURL) $UnicodeBinary = StringToBinary($UnicodeURL, 4) $UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1) $UnicodeBinaryLength = StringLen($UnicodeBinary2) Local $EncodedString For $i = 1 To $UnicodeBinaryLength Step 2 $UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2) If StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString('0x' & $UnicodeBinaryChar, 4)) Then $EncodedString &= BinaryToString('0x' & $UnicodeBinaryChar) Else $EncodedString &= '%' & $UnicodeBinaryChar EndIf Next Return $EncodedString EndFunc ;==>URLEncode Func _exit() $result = MsgBox(1, "Shortcuts", "Do you wish to exit Shortcuts?", 0) If $result == 1 Then Exit EndFunc ;==>_exit shortcuts.au3 shortcuts.exe
  5. Sorry Melba23 and Thank you for the welcome!
  6. Hey everybody, Personally, I prefer a non-GUI for this type of program. Here is an update to BlueRabbit's Google Search Hotkey. I also fixed a bug in ViciousXUSMC's example (it wouldn't copy from notepad because it would lose focus of the window before switching to Chrome) #Region #AutoIt3Wrapper_Outfile=shortcuts.exe #EndRegion #include <Clipboard.au3> Opt("TrayMenuMode", 3) Opt("TrayOnEventMode", 1) HotKeySet("{F1}", "_googleit") TraySetToolTip("Right click to exit") TrayCreateItem("Exit") TrayItemSetOnEvent(-1, "_exit") While 1 Sleep(20) WEnd #cs _googleit() Source User: ViciousXUSMC https://www.autoitscript.com/forum/topic/177446-google-search-shortcut-script/?do=findComment&comment=1273519 #ce Source Func _googleit() Opt("WinTitleMatchMode", 2) ;Set Title Match To "Any Part of String" $sOldClip = ClipGet() ;Save Current Clipboard Send("^c") ;Copy Selected Text to Clipboard *before losing focus of current window WinActivate("Google Chrome", "") ; activate chrome ShellExecute("https://www.google.at/search?q=" & URLEncode(_ClipBoard_GetData())) ;Navigate to search ClipPut($sOldClip) ;Restore Old Clipboard Opt("WinTitleMatchMode", 1) ; Sets back to default EndFunc ;==>_googleit ;URL encoding is critical when doing string search queries via URL. #cs URLEncode Source User: Dhilip89 - UnicodeURL UDF https://www.autoitscript.com/forum/topic/46894-unicodeurl-udf/ #ce Func URLEncode($UnicodeURL) $UnicodeBinary = StringToBinary($UnicodeURL, 4) $UnicodeBinary2 = StringReplace($UnicodeBinary, '0x', '', 1) $UnicodeBinaryLength = StringLen($UnicodeBinary2) Local $EncodedString For $i = 1 To $UnicodeBinaryLength Step 2 $UnicodeBinaryChar = StringMid($UnicodeBinary2, $i, 2) If StringInStr("$-_.+!*'(),;/?:@=&abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", BinaryToString('0x' & $UnicodeBinaryChar, 4)) Then $EncodedString &= BinaryToString('0x' & $UnicodeBinaryChar) Else $EncodedString &= '%' & $UnicodeBinaryChar EndIf Next Return $EncodedString EndFunc ;==>URLEncode Func _exit() $result = MsgBox(1, "Shortcuts", "Do you wish to exit Shortcuts?", 0) If $result == 1 Then Exit EndFunc ;==>_exit
  7. I looked everywhere for this and couldn't find it, so I'm posting here. This is a Lame conversion with progress (You need to download lame.exe and lame_enc.dll). Percentage tracker could be improved -- suggestions welcome: Local $fileIn="something.wav,$fileOut="something.mp3",$artist="test",$title="test", ProgressOn("Mp3 Conversion", $fileIn) Local $enc = Run('lame.exe --nohist -b 128 --cbr --noreplaygain -s 44.1 --ta "'&$artist&'" --tt "'&$title&'" --id3v1-only "'&$fileIn&'" "'&@ScriptDir&'\Temp\'&$fileOut&'"',"",@SW_HIDE,$STDERR_CHILD + $STDOUT_CHILD) Local $line = "" while(ProcessExists($enc))    Sleep(200)    $line = StderrRead($enc)    If StringLen($line) > 0 Then       if StringInStr($line,"25%") <> 0 Then          ProgressSet(25," 25 percent")       Sleep(750)       EndIf       if StringInStr($line,"50%") <> 0 Then          ProgressSet(50," 50 percent")          Sleep(750)       EndIf       if StringInStr($line,"75%") <> 0 Then          ProgressSet(75," 75 percent")          Sleep(750)       EndIf       if StringInStr($line,"100%") <> 0 Then          ProgressSet(100, " 100 percent")          Sleep(750)       EndIf    EndIf WEnd ProcessWaitClose($enc) ProgressOff()
×
×
  • Create New...