Messages - lifeweaver [ switch to compact view ]

Pages: prev1 2 3 [4] 5next
16
Thanks for the feed back ashecorven!  Sorry about the conversion issues, it was one of my main worries, I realize that if you're using a conversion tool you need it to be rock solid.

To clarify:

- HEX to binary is actually doing text to binary.
- Binary to HEX is actually doing text to hex.
So for these use cases what you want is to decode the HEX to text then encode that text to Binary verses encoding the HEX to Binary? And you want to do the same for the Binary to HEX?

Also is it possible to have it encode to all types at once? i.e. Choose only the input type and it outputs to multiple text boxes, then each could be copied to clipboard, input box, etc.
I'll work on this while I wait for your reply on the first question.

17
Hi gr3gw,

The ShellExView tool from Nirsoft will answer your questions, the tool includes a 'File Extensions' column with values like 'Directory', 'AllFilesystemObjects', and many file extensions.
This should help you understand where the entries are coming from.

18
Post New Requests Here / Re: IDEA: Comments Column Notes
« on: August 07, 2015, 02:47 PM »
This script with add/modify comments on folders via the Desktop.ini, to do this it makes the folder a system folder.
I couldn't figure out how to get explorer to reliably refresh but know that eventually the comments you choose will appear.

Use the script by installing AutoHotkey, double clicking on the script, and pressing alt + z.


;
; ==========================================================================================================
; Author               : LifeWeaver <[email protected]>
; Script Name        : SetFolderComments
; Script Version     :
; Homepage          :
;
; Creation Date      : 08/07/2015
; Modification Date :
;
; Description       : Lets you set comments on a folder via Desktop.ini
; ===================
;
; ----------------------------------------------------------------------------------------------------------

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force

ActiveExplorerWindow()
{
  for window in ComObjCreate("Shell.Application").Windows
    if window.HWND = WinExist("A")
      return window
}

ExplorerItemsSelected(window)
{
  return window.Document.SelectedItems().count
}

SetFolderComments(folderPath, comments)
{
  desktopIniPath := folderPath . "\desktop.ini"
  ifExist %desktopIniPath%
  {
    ; desktop.ini file exists edit the InfoTip
    FileRead, desktopIniContents, %desktopIniPath%
  }
  else
  {
    ; set default desktop.ini contents
    desktopIniContents := "[.ShellClassInfo]`nInfoTip=`n"
  }
 
  FileDelete, %desktopIniPath%
  desktopIniContents := RegExReplace(desktopIniContents, "(?<=InfoTip=).*$", comments)
 
  FileAppend, %desktopIniContents%, %desktopIniPath%
  if(ErrorLevel)
  {
    msgbox problem(%A_LastError%) appending to %desktopIniPath%
  }
  else
  {
    ; Had issues with permission, running via hidden cmd
    Run, %comspec% /c attrib +S "%folderPath%" && attrib +H +S +A "%desktopIniPath%",,Hide
  }
 
  ; Update explorer
  DllCall( "Shell32\SHChangeNotify", UInt,0x08000000, UInt,0, Int,0, Int,0 ) ; SHCNE_ASSOCCHANGED
}

RemoveFolderComments(folderPath)
{
  IniDelete, %folderPath%, .ShellClassInfo, InfoTip
}

#IfWinActive
!z::
window := ActiveExplorerWindow()
InputBox, comment, Folder Comment, Enter folder(s) comment
; if an item(s) is/are selected set the comment on all files selected
if(ExplorerItemsSelected(window))
{
  for item in window.Document.SelectedItems()
    SetFolderComments(item.Path, comment)
}
else
{
  folderPath := window.Document.Folder.Self.path
  SetFolderComments(folderPath, comment)
}

return


Note: Autohotkey is need to run this script, although you could compile it and merely have an .exe.
Script runs on: Windows 7 Professional, AutoHotkey 1.1.15.04 Unicode build

19
Coding Snacks / Re: Packrat's tool for "Idea Surfing" the web
« on: July 27, 2015, 02:10 PM »
Hi questorfla,

While I'm not sure on the exact requirements it sounds like you know some AHK so you could probably modify this solution to fit your exact needs.
Script runs on: Windows 7 Professional, AutoHotkey 1.1.15.04 Unicode build

To use:
  • Have script running
  • Have url of webpage you want to save in clipboard
  • Press Alt+z to activate script
  • Select folder you want the files in, optionally creating a folder via the provided dialog.
  • It's done and will open the 'additional_info.txt' file in Notepad++, the script will also put the folder path in your clipboard
  • If there is a problem saving the .mht file you'll see a messagebox

Save_Webpage_As_MHT(url, saveFile)
{ ; https://groups.google.com/d/msg/microsoft.public.scripting.wsh/97WUK2_3U_4/mZJyxKf_FfAJ
  message := ComObjCreate("CDO.Message")
  conf := ComObjCreate("CDO.Configuration")
  message.Configuration := conf
  message.CreateMHTMLBody(url)
  stream := message.GetStream()
  stream.SaveToFile(saveFile)
  message := ""
  conf := ""
  stream := ""
  IfExist, %saveFile%
    return true
  else
    return false
}

Open_File_With_Notepad_Plus_Plus(file)
{
  notepad_Plus_Plus_Path := A_ProgramFiles . "\Notepad++\notepad++.exe"
  
  IfNotExist, %notepad_Plus_Plus_Path%
    notepad_Plus_Plus_Path := A_ProgramFiles . " (x86)\Notepad++\notepad++.exe"

  Run, "%notepad_Plus_Plus_Path%" "%file%"
}

#IfWinActive
!z::

; Persume url was in clipboard when script was called
url := Clipboard

; Get download folder
downloadsFolder := SubStr(A_Desktop, 1, StrLen(A_Desktop) - 7) . "Downloads"

; Dialog to get selected folder and create .mht file save path
FileSelectFolder, selectedFolder, %downloadsFolder%,, Select a download folder
archiveSavePath := selectedFolder . "\webpageSnapshot-" . A_Now . ".mht"

if (!Save_Webpage_As_MHT(url, archiveSavePath))
  msgbox Problem creating %archiveSavePath% for url: %url%
else
{
  FileCreateShortcut, %url%, %selectedFolder%\link.lnk
  FileAppend,, %selectedFolder%\additional_info.txt

  Open_File_With_Notepad_Plus_Plus(selectedFolder . "\additional_info.txt")
  Clipboard := selectedFolder
}

return

Note: If you really wanted to have a way to use this via the 'right-click' you could modify the script to take a command line parameter and compile it, then add a 'right-click' menu option via regedit.exe similar to here.

Also you might be able to integrate with your favorite browser to use URLDownloadToFile.

20
Just wanted to say welcome to the site lifeweaver, and thank you for sharing your code  :up: :up: :up:

Thanks I've lurked fore a while and was glad to find something I could contribute to.

Pages: prev1 2 3 [4] 5next
Go to full version