Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How do I pass this parameter to program


  • Please log in to reply
3 replies to this topic
oversky
  • Members
  • 12 posts
  • Last active: Mar 17 2009 03:45 PM
  • Joined: 03 Nov 2005
I try to run the following program with parameters

program name: C:\WINDOWS\system32\rundll32.exe
parameters: D:\PROGRA~1\ThinkPad\UTILIT~1\pwrwiz.ocx,StartWizard ShowSchemePg

I use the following command:
run, C:\WINDOWS\system32\rundll32.exe"D:\PROGRA~1\ThinkPad\UTILIT~1\pwrwiz.ocx,StartWizard ShowSchemePg"

But I got an erro message. It seems like the parameter that AHK get is only
Params:<:\PROGRA~1\ThinkPad\UTILIT~1\pwrwiz.ocx>

shimanov
  • Members
  • 610 posts
  • Last active: Jul 18 2006 08:35 PM
  • Joined: 25 Sep 2005
It is necessary to escape the comma as follows:

pwrwiz.ocx`,StartWizard


oversky
  • Members
  • 12 posts
  • Last active: Mar 17 2009 03:45 PM
  • Joined: 03 Nov 2005
Thanks for the hint. I made it work as
run, C:\WINDOWS\system32\rundll32.exe D:\PROGRA~1\ThinkPad\UTILIT~1\pwrwiz.ocx`,StartWizard ShowSchemePg
I would suggest having some examples in the help of the run command.

It is necessary to escape the comma as follows:

pwrwiz.ocx`,StartWizard



shimanov
  • Members
  • 610 posts
  • Last active: Jul 18 2006 08:35 PM
  • Joined: 25 Sep 2005
There is documentation in the "FAQ" section of the documentation:

When should percent signs and commas be escaped?
...
Literal commas must also be escaped (`,) except when used in MsgBox or the last parameter of any command (in which case the accent is permitted but not necessary).

When commas or percent signs are enclosed in quotes within an expression, the accent is permitted but not necessary. For example: Var := "15%".