Jump to content











Photo
- - - - -

Add_Shortcut: Parameter with paces.


  • Please log in to reply
4 replies to this topic

#1 Guido Eisenbeis

Guido Eisenbeis

    Newbie

  • Members
  • 20 posts
  •  
    Germany

Posted 19 November 2009 - 12:49 AM

I use WB 078 SP4. I want to use Add_Shortcut with an unknown parameter with spaces. The parameter is passed from a Textbox or Filebox.

Example:

[Process]

IniWrite,%target_win%\%pFileBox1%,Test,Key,just-a-test



Add_Shortcut,AutoStart,,"#$pSystemRoot#$p\SYSTEM32\notepad.exe","TestShortCut",,#$q#$pSystemRoot#$p\%pFileBox1%#$q

if you enter in the FileBox "MyTest.ini" (WITHOUT spaces) is the result:

...

shortCutExe=%SystemRoot%\SYSTEM32\notepad.exe

shortCutToolTip=

shortCutParameters=%SystemRoot%\MyTest.ini

...

if you enter in the FileBox "My Test.ini" (WITH a space) is the result:

...

shortCutExe=%SystemRoot%\SYSTEM32\notepad.exe

shortCutToolTip=

shortCutParameters=%SystemRoot%\My   <--- ?

...
I've tried all possibilities with #$s, #$q, "strFormat, REPLACE, ...", and so on.

I have a workaround, where I renamed the file in the parameter. But how can I create a Shortcut with spaces in the parameters?

Guido.

#2 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 19 November 2009 - 01:13 AM

you should write which project you are using,

anyway,
try
Add_Shortcut,AutoStart,,#$pSystemRoot#$p\SYSTEM32\notepad.exe,TestShortCut,,"##$q#$pSystemRoot#$p\%pFileBox1%##$q"
and
Add_Shortcut,AutoStart,,#$pSystemRoot#$p\SYSTEM32\notepad.exe,TestShortCut,,##$q#$pSystemRoot#$p\%pFileBox1%##$q

#3 Guido Eisenbeis

Guido Eisenbeis

    Newbie

  • Members
  • 20 posts
  •  
    Germany

Posted 19 November 2009 - 01:43 AM

I use the LiveXP project. Are there any others? :w00t: :cheers: :(

I do not work constantly on my LiveXP, but again and again. And I know that I have long sought a solution to this problem. Thank you, it works fine! :dubbio:

Guido.

#4 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 19 November 2009 - 02:15 AM

Welcome back Guido Eisenbeis, sorry :cheers: I just remember you :dubbio:

#5 Guido Eisenbeis

Guido Eisenbeis

    Newbie

  • Members
  • 20 posts
  •  
    Germany

Posted 19 November 2009 - 02:43 AM

Thanks! :dubbio:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users