| View previous topic :: View next topic |
| Author |
Message |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Mon Aug 08, 2011 6:26 am Post subject: Feature Request :execute cmd with the hyperlink,plz! |
|
|
something like this:
when I click the hyperlink
C:\Program Files\AkelPad\AkelPad.exe" /Call("Scripts::Main", 1, "EvalCmd.js", "AkelPad.SetSel(42, 1000)")
in Akelpad, I want Akelpad can execute the command! I hope Akelpad can jump to the specified position with hyperlink!
Last edited by yyzh829 on Mon Aug 08, 2011 10:30 am; edited 1 time in total |
|
| Back to top |
|
 |
cnnnc
Joined: 12 Jan 2008 Posts: 115 Location: Shantou, China
|
|
| Back to top |
|
 |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Mon Aug 08, 2011 10:28 am Post subject: |
|
|
thanks,but I hope just one simple click can open the hypelink or run the command!
if I click D:\test.txt#42:1000 or D:test.txt#42
akelpad return to the line i specified,that will be perfect!
btw, OpenEveryLine.js seems not working,need modify this:
WshShell.Exec(pLinesArray[nIndex]); |
|
| Back to top |
|
 |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Mon Aug 08, 2011 10:33 am Post subject: |
|
|
中国的!握手啊,Akelpad很好用啊!自定义快捷键是神器啊! |
|
| Back to top |
|
 |
FeyFre
Joined: 07 Aug 2007 Posts: 1892 Location: Vinnitsa, Ukraine
|
Posted: Mon Aug 08, 2011 8:24 pm Post subject: |
|
|
| D:\test.txt is not document URL, but UNC name, so it cannot have @fragment part. |
|
| Back to top |
|
 |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Tue Aug 09, 2011 4:29 am Post subject: |
|
|
| FeyFre wrote: | | D:\test.txt is not document URL, but UNC name, so it cannot have @fragment part. |
that's why i need the function! |
|
| Back to top |
|
 |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Wed Aug 10, 2011 10:38 am Post subject: |
|
|
URL#nSelStart:nSelEnd ,select the URL,then set this js a hotkey!
| Code: | var URL = AkelPad.GetSelText().match(/.+(?=#)/g);
var nSelStart = AkelPad.GetSelText().match(/([^#:](?!.*\#)(?=.*\:))+/g);
var nSelEnd= AkelPad.GetSelText().match((/([^:](?!.*\:))+/g));
AkelPad.OpenFile(URL);
AkelPad.SetSel(nSelStart, nSelEnd); |
|
|
| Back to top |
|
 |
yyzh829
Joined: 08 Aug 2011 Posts: 15
|
Posted: Wed Aug 10, 2011 10:42 am Post subject: |
|
|
this is how to generate the URL:
| Code: | | AkelPad.SetClipboardText(AkelPad.GetEditFile(0)+"#"+AkelPad.GetSelStart()+":"+AkelPad.GetSelEnd()); |
|
|
| Back to top |
|
 |
|