Jump to content

masvil

Active Members
  • Posts

    173
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

masvil's Achievements

Prodigy

Prodigy (4/7)

3

Reputation

  1. The following example should be "universal" because it checks ALL existing/valid instances on both hidden and visible icons. So it should be working on all past and future Windows vers unless the class(es) name will change. Note: there are some programs using a no-standard instance, but with my method you can catch those icons as well. #NoTrayIcon #include <GuiToolBar.au3> Local $VisibleIcons Local $HiddenIcons Local $Instance ; Find systray handle for "User Promoted Notification Area" $Instance = 0 While 1 $Instance = $Instance + 1 Local $hSysTray_Handle = ControlGetHandle("[Class:Shell_TrayWnd]", "", "[Class:ToolbarWindow32;Instance:" & $Instance & "]") If @error Then ExitLoop If Not @Compiled Then ConsoleWrite("VISIBLE at Istance #" & $Instance & ":" & @CRLF) Local $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle) ; Get vidible systray icon count For $iSystray_ButtonNumber = 0 To $iSysTray_ButCount - 1 $text = _GUICtrlToolbar_GetButtonText($hSysTray_Handle, $iSystray_ButtonNumber) If Not @Compiled Then ConsoleWrite($text & @CRLF) Next If Not @Compiled Then ConsoleWrite(@CRLF) WEnd ; Find systray handle for "Overflow Notification Area" i.e. hidden icons $Instance = 0 While 1 $Instance = $Instance + 1 Local $hSysTray_Handle_Hidden = ControlGetHandle("[Class:NotifyIconOverflowWindow]", "", "[Class:ToolbarWindow32;Instance:" & $Instance & "]") If @error Then ExitLoop If Not @Compiled Then ConsoleWrite("HIDDEN at Istance #" & $Instance & ":" & @CRLF) $iSysTray_ButCount = _GUICtrlToolbar_ButtonCount($hSysTray_Handle_Hidden) ; Get hidden systray icon count For $iSystray_ButtonNumber = 0 To $iSysTray_ButCount - 1 $text = _GUICtrlToolbar_GetButtonText($hSysTray_Handle_Hidden, $iSystray_ButtonNumber) If Not @Compiled Then ConsoleWrite($text & @CRLF) Next WEnd Exit
  2. @Mbee can you please share your update version? I hope @wraithdu will update the original UDF soon or later.
  3. Very useful script, I'm using it here. I found a bug: In case of: [SectionName] textany=something text=something else Then the returned Key for for the Value "text" is wrong. It's like the function stuck on the Value "textany" because of the same initial string.
  4. Your project is huge! Can it read the key from something like %TEMP%\password-inside.txt ?
  5. Thank you for the clarification. It works, of course. No way to generate the body as plain text?
  6. I can't get a line feed in the body. If I try: $Body = "one" & @CRLF & "two" & @CRLF & "three" I receive an email with "one two three" as body I'd like to get: one two three Any help?
  7. The script shows the offset from GMT-UTC in standard format through string manipulation. #include <Date.au3> ConsoleWrite (_TimeZoneInfo() & @CRLF) Func _TimeZoneInfo() $aInfo = _Date_Time_GetTimeZoneInformation() ConsoleWrite("bias: " & $aInfo[1] & @CRLF) $hours = $aInfo[1] / 60 If $hours = "0" Then $hours = "+00:00" Else If StringInStr($hours, "-") Then $hours = StringReplace($hours, "-", "+") Else $hours = "-" & $hours EndIf If Not StringInStr($hours, ".") Then $hours = $hours & ":00" $hours = StringReplace($hours, ".5", ":30") $hours = StringReplace($hours, ".75", ":45") If StringLen($hours) = 5 Then $hours = StringLeft($hours, 1) & "0" & StringRight($hours, 4) EndIf Return ($aInfo[2] & " (GMT" & $hours & ")") EndFunc ;==>_TimeZoneInfo
  8. Amazin project! Any plan to integrate the Koda GUI builder (like in Scite)?
  9. OK, you put me in the right direction. Thank you! So for now my best solution is to create the shortcut and then copy the shortcut itself to clipboard, so on the next manual Explorer's "Paste" command the trick is done. #include <Misc.au3> $FileCreateShortcut = FileCreateShortcut("path\to\file", @TempDir & "\shortcut.lnk", @ScriptDir, "", "", "", "") _ClipPutFile(@TempDir & "\shortcut.lnk")
  10. The file exists. I want to copy it to clipboard using AutoIt and THEN be able to MANUALLY "paste as clipboard" using Windows Explorer (or any File Manager). If you copy a file using Explorer after that you have 2 options: "Paste" and "Paste as shortcut". If you copy a file using AutoIt's _ClipPutFile after that you have only one option: "Paste". So in the end I want to simulate the Explorer's "Copy" command. @Earthshine I just want be sure I'm making it clear. So can you please confirm your previous reply?
  11. How can I copy a file to clipboard to be manually pasted as shortcut through Explorer? If I use _ClipPutFile then only "Paste" command is available in Explorer context menu. I need "Paste as shortcut" to be available too.
  12. So how can I test if @j0kky's suspicion is reasonable?
  13. It works great on Windows 10 too. @wraithdu well done!
  14. You mean maybe StringSplit could interprete an eventual 0x20 string in the text (clear or encrypted should be the same) as a white space (so a separator), right? If so, I've coded an example (grabbed from the Help) to test it. It doesn't detect 0x20 as a white space separator: Example() Func Example() Local $aDays = StringSplit("Mon0x20Tues0x20Wed0x20Thur0x20Fri0x20Sat0x20Sun", " ") ; Split the string of days using the delimiter " " and the default flag value. For $i = 1 To $aDays[0] ; Loop through the array returned by StringSplit to display the individual values. MsgBox(0, "", "$aDays[" & $i & "] - " & $aDays[$i]) Next EndFunc ;==>Example
  15. It works as well (if I well understood your question). You can replace one of the three original strings with " " in my code to check it out.
×
×
  • Create New...