Feature Request - open link in ctrl+z comments directly
Moderators: white, Hacker, petermad, Stefan2
Feature Request - open link in ctrl+z comments directly
I often add url as comment information for file/folder.
Is there a way to quickly open that url with a command? hotkey? or combine key? without ---
open comment - copy - paste to browser
PS: There is only url in the comment content.
Is there a way to quickly open that url with a command? hotkey? or combine key? without ---
open comment - copy - paste to browser
PS: There is only url in the comment content.
Re: Feature Request - open link in ctrl+z comments directly
You can use an script (VBS, JS, AutoHotkey, PowerShell) to
- take the name of the selected file (TC parameter "%P%O.%E")
- parse the descript.ion file ("%Pdescript.ion")
- for that name and read the comment
- if the comment is an URL > execute it
Such script you can use as button or assign an hotkey to it.
Re: Feature Request - open link in ctrl+z comments directly
Awesome idea. Will anyone write a script, please?You can use an script (VBS, JS, AutoHotkey, PowerShell) to
- take the name of the selected file (TC parameter "%P%O.%E")
- parse the descript.ion file ("%Pdescript.ion")
- for that name and read the comment
- if the comment is an URL > execute it
Last edited by soc on 2019-12-04, 19:48 UTC, edited 1 time in total.
Re: Feature Request - open link in ctrl+z comments directly
To Stefan2:
Will you write a script? AHK or VBS maybe.
Sor
Will you write a script? AHK or VBS maybe.
Sor
Re: Feature Request - open link in ctrl+z comments directly
Let's say it's on my "todo" list ... but I have no time right now to fork my
spare time even more,... should be easy task, but often takes time to test ...and the little details...
Any other takers?
I am thinking about a script which takes current selected file as parameter
- split path and open "path\descript.ion" file
- parse descript.ion for the file name and take the comment part
- if the comment starts with (what? http? www? ...?) > execute it to open the system default application for url.
- - -
F A Q s: File comments descript.ion (descriptions Ctrl+Z)
viewtopic.php?f=3&t=52534&p=355053
Re: Feature Request - open link in ctrl+z comments directly
arrg,... anyway, here is version 1, quick&dirty,... please try
My test "descript.ion" file:
CGLPT64.SYS Parallel port driver for Windows XP/Vista/7/8/8.1/10 x64
"zzTest - Kopie.txt" www.pspad.com
zzTest.txt www.microsoft.com
zzTest 2.txt-->ghisler.ch
CABRK.DLL CAB unpacker DLL
Code: Select all
'##########################################
'https://ghisler.ch/board/viewtopic.php?f=3&t=54909&p=364314#p364314
'Re: Feature Request - open link in ctrl+z comments directly
'##########################################
'09:38 - 05.12.2019 v00.1 by Stefan
'-PURPOSE:
'-Script to read descript.ion file for selected file and read the comment:
'-- Select a file
'-- Click this button
'-- Script looks up the comment for that file from descript.ion
'-- Script execute that comment which is assumed to be an URL. . . . . . . . . . . <<< please BE carefull
'-
'-BUTTON HELP:
'Create a plain text file with name ExecuteURLFromComment.vbs
'Copy this code to that file.
'Drag&Drop that VBS file to TCs' button bar
'Edit the button to look like:
'Command: "D:\rive\path to this\file.vbs"
'Parameters: "%P" "%O.%E"
'Start path:
'Icon: C:\WINDOWS\System32\WScript.exe --- or wcmicons.dll --- or what you want
'Tooltip: your description here
'##########################################
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WSO = CreateObject("WScript.Shell")
'msgbox Wscript.arguments.Count 'Please provide two args, so we don't have to split path and file our self ;-)
IF(Wscript.arguments.Count >1) THEN
sPATH = Wscript.arguments.Item(0) ' The current active folder, due to the "%P" param
sFILE = Wscript.arguments.Item(1) ' The current selected file, due to the "%O.%E"
sFileToRead = sPATH & "descript.ion" ' The descript.ion file in the current active folder
ELSE
MsgBox "Error, need to parameters: %P and %O.%E , best in quotes! See VBS-Code at BUTTON HELP. Bye."
WScript.Quit
END IF
If((sPATH="") OR (sFILE="")) Then MsgBox "sPATH %P or sFILE %O.%E is missing, check Button parameters. Bye." : WScript.Quit
If FSO.FileExists(sFileToRead) Then
'out = "File found: "&vbLF&vbLF&"Search: "&sFileToRead&vbLF&vbLF&"For: "&sFile : MsgBox out
Else
MsgBox "no descript.ion "&vbLF&sFileToRead&vbLF&" file found in that folder!!! Bye." : WScript.Quit
End If
Set oTextStream = FSO.OpenTextFile(sFileToRead,1)
Do Until oTextStream.AtEndOfStream
c=c+1
L=oTextStream.ReadLine
L=replace(L,chr(9),chr(32))
L=trim(L)
If(Left(L,1)=chr(34)) Then
FNE=InStr(2,L,chr(34))
Else
FNE=InStr(2,L,chr(32))
End If
FN = Left(L,FNE) : FN=replace(FN,chr(34),"") : FN = Trim(FN)
FC = Mid(L,FNE+1) : FC = Trim(FC)
'msgbox c & ". "&vbLF&"Line: "&L&vbLF&"FileName: "&FN&vbLF&"FileComment: "&FC &vbLF&vbLF&vbLF&sFILE
If(FN=sFILE) Then
msgbox "FOUND.... File " & FN & " has comment " & FC
'ToDo: check comment if it *IS* an URL
'ToDo: prompt user if he realy *WANT* to execute that URL
WSO.run FC
WScript.QUIT
End If
Loop
oTextStream.Close
MsgBox "i am done, but nothing was found."
'##########################################
HTH?
Re: Feature Request - open link in ctrl+z comments directly
And this is my very simple AHK script (and quick and dirty too)
(Using F12 as a hotkey)
Code: Select all
#NoTrayIcon
F12::
{
Send, {CTRLDOWN}zac{CTRLUP}, {ESC}
Run, %clipboard%
Return
}
Re: Feature Request - open link in ctrl+z comments directly
haha , where is the thumbsup emoji if we need one?
Good work :thumbsup : (thumbsup works for me only on a few browser)
Re: Feature Request - open link in ctrl+z comments directly
The script works! And of course the keystrokes of AHK also does. Exactly as requested by Dwhite.
I was however of the impression that url will coexist with comment text and the script would seek out the url and execute it. Can this be done?
I was however of the impression that url will coexist with comment text and the script would seek out the url and execute it. Can this be done?
Re: Feature Request - open link in ctrl+z comments directly
The original poster said
"PS: There is only url in the comment content."
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Re: Feature Request - open link in ctrl+z comments directly
Gral,
Roman
Code: Select all
Send, {CTRLDOWN}zac{CTRLUP}, {ESC}
Code: Select all
Send, {CTRLDOWN}zac{CTRLUP}{ESC}
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Re: Feature Request - open link in ctrl+z comments directly
Sorry for the late reply...
Thank you so much for all of you especially Stefan2 Gral !!!
The VBS file works great.
The ahk file have bugs —— its OK when I selected the file with comments, but when I target to the file without comments, it still open the link in the .ion's first file comments. namely www.google.com see blow.
F12 works on all files(no matter it contains comments or not) in the same folder.
eg.
second.txt www.youtube.com
first.txt www.google.com
@Hacker
you change seems doesn't work...(for me)
What I said "PS: There is only url in the comment content."
I just wanna make the question more simple.
Maybe we can use regular expression to capture the URL links.
But this is just my idea, I am not and I have no rights to ask anyone to write a script for that.
for now, Stefan2's script works great already.
Thanks again!
Best regards.
Thank you so much for all of you especially Stefan2 Gral !!!
The VBS file works great.
The ahk file have bugs —— its OK when I selected the file with comments, but when I target to the file without comments, it still open the link in the .ion's first file comments. namely www.google.com see blow.
F12 works on all files(no matter it contains comments or not) in the same folder.
eg.
second.txt www.youtube.com
first.txt www.google.com
@Hacker
you change seems doesn't work...(for me)
What I said "PS: There is only url in the comment content."
I just wanna make the question more simple.
Maybe we can use regular expression to capture the URL links.
But this is just my idea, I am not and I have no rights to ask anyone to write a script for that.
for now, Stefan2's script works great already.
Thanks again!
Best regards.