Old 22nd May 2006, 16:22   #1
blue_harvester
Junior Member
 
Join Date: May 2006
Posts: 27
Using variable URLs in Link fields on custom pages?

I have constructed the URL of a directory on the local file system:

code:

StrCpy $tmp_url "file:///c:/temp"



Can thie $tmp_url be inserted into a Link field on a custom page? I have tried it but the folder does not open up when I click on the link.

Is this possible?
blue_harvester is offline   Reply With Quote
Old 22nd May 2006, 16:43   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
First you have to extract the file somewhere.
Then strcpy $tmp_url "$somewhere\readme.htm"
And finally WriteIniStr "$PLUGINSDIR\custom.ini" "field 2(the actual link field)" "State" "$tmp_url" before show the custom page.
Oops now I see that you want to open a folder with explorer, plz ignore the above :-)

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 22nd May 2006, 16:44   #3
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
"file://localhost/C:/temp"

[edit] your variant also work[/edit]
Instructor is offline   Reply With Quote
Old 22nd May 2006, 20:53   #4
blue_harvester
Junior Member
 
Join Date: May 2006
Posts: 27
Quote:
Originally posted by Instructor
"file://localhost/C:/temp"

[edit] your variant also work[/edit]
I have tried this but it doesn't work. Any other ideas? I thought this would've been a simple task to carry out in NSIS?
blue_harvester is offline   Reply With Quote
Old 22nd May 2006, 20:57   #5
blue_harvester
Junior Member
 
Join Date: May 2006
Posts: 27
Quote:
Originally posted by Instructor
"file://localhost/C:/temp"

[edit] your variant also work[/edit]
I've also tried the following just to see if there was a problem with all URLs:

code:

StrCpy $tmp_url "http://www.google.com/"



But this doesn't work either!

Do I need some plugin to allow this functionality to be enabled?
blue_harvester is offline   Reply With Quote
Old 23rd May 2006, 08:32   #6
blue_harvester
Junior Member
 
Join Date: May 2006
Posts: 27
Got it to work guys. Used the following:

code:

StrCpy $var_MANUAL_INST_URL "file://localhost/c:/temp"

InitPluginsDir
File /oname=$PLUGINSDIR\Main_Screen_4a.ini "Main_Screen_4a.ini"
WriteIniStr "$PLUGINSDIR\Main_Screen_4a.ini" "Field 2" "State" "$var_MANUAL_INST_URL"



Cheers guys.
blue_harvester is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump