AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Feature Request :execute cmd with the hyperlink,plz!

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Mon Aug 08, 2011 6:26 am    Post subject: Feature Request :execute cmd with the hyperlink,plz! Reply with quote

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
View user's profile Send private message
cnnnc



Joined: 12 Jan 2008
Posts: 116
Location: Shantou, China

PostPosted: Mon Aug 08, 2011 9:44 am    Post subject: Reply with quote

OpenEveryLine.js
Back to top
View user's profile Send private message Send e-mail
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Mon Aug 08, 2011 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Mon Aug 08, 2011 10:33 am    Post subject: Reply with quote

cnnnc wrote:
OpenEveryLine.js

中国的!握手啊,Akelpad很好用啊!自定义快捷键是神器啊!
Back to top
View user's profile Send private message
FeyFre



Joined: 07 Aug 2007
Posts: 2057
Location: Vinnitsa, Ukraine

PostPosted: Mon Aug 08, 2011 8:24 pm    Post subject: Reply with quote

D:\test.txt is not document URL, but UNC name, so it cannot have @fragment part.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Tue Aug 09, 2011 4:29 am    Post subject: Reply with quote

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
View user's profile Send private message
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Wed Aug 10, 2011 10:38 am    Post subject: Reply with quote

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
View user's profile Send private message
yyzh829



Joined: 08 Aug 2011
Posts: 15

PostPosted: Wed Aug 10, 2011 10:42 am    Post subject: Reply with quote

this is how to generate the URL:
Code:
AkelPad.SetClipboardText(AkelPad.GetEditFile(0)+"#"+AkelPad.GetSelStart()+":"+AkelPad.GetSelEnd());
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group