AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"variable name missing its percent sign"

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
johan
Guest





PostPosted: Tue Jun 05, 2007 10:01 am    Post subject: "variable name missing its percent sign" Reply with quote

Hello!

I'm trying to run a UNIX command i a Putty session. My goal is to add date to a filename:

send, mv FILENAME /home/user/workspace/project/`/usr/bin/date -u +"%y%m%d" | /usr/bin/sed 's/ //g'`_FILENAME{enter}

When I run my AutoHothey script I get an Error:
This parameter contains a variable name missing its percent sign. The program will exit.

I've tried solutions like .."%%y%%m%%d... but it didnt work.

Pls help.

//Johan
Back to top
Helpy
Guest





PostPosted: Tue Jun 05, 2007 10:29 am    Post subject: Reply with quote

Escape sequences
That's `%
Back to top
johan
Guest





PostPosted: Tue Jun 05, 2007 1:08 pm    Post subject: My "+"-sign disappers Reply with quote

Thanks!

Now I got another problem. My "+"-sign disappers running the script:

send, mv FILENAME /home/user/workspace/project/`/usr/bin/date +"%y%m%d" | /usr/bin/sed 's/ //g'`_FILENAME{enter}

`+ dont fix it.

Du You have any solution on this problem?

Brgds // Johan
Back to top
Helpy
Guest





PostPosted: Tue Jun 05, 2007 2:17 pm    Post subject: Reply with quote

Use SendRaw when you have no special sequences like +{F4} (that's Shift+F4} to send.
Otherwise, escape sequences in Send are different (I know, I know...): {+}, but using SendRaw allows you not to wonder if this or that symbol is special...
Back to top
koosie
Guest





PostPosted: Wed Jun 06, 2007 7:02 pm    Post subject: Reply with quote

johan hoe gaan dit ? Wink
Back to top
Stefan



Joined: 30 Jul 2004
Posts: 72
Location: Deutschland (sorry for my english)

PostPosted: Sat Jun 09, 2007 12:46 pm    Post subject: Reply with quote

Helpy wrote:
Escape sequences
That's `%


I have missed this info in the help about "Send"
because i tried to send an %

Maybe there should be an quick info about such special chars
and an link to "EscapeChar" with the "Related" section?

Related
SendMode, SetKeyDelay, SetStoreCapslockMode, EscapeChar, ControlSend, BlockInput, Hotstrings, WinActivate


--

BTW: ` is Alt+96
The german key board have an `´-key.
You can get this `-char by holding the Shift-key and pressing this `´-key
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 6772
Location: Pacific Northwest, US

PostPosted: Sat Jun 09, 2007 9:54 pm    Post subject: Reply with quote

Suggestions on documentation improvements

This thread will always get a response from Chris.
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Johan
Guest





PostPosted: Mon Jun 11, 2007 7:52 am    Post subject: Reply with quote

Hello!

Sorry for the late answer. The Sun in Sweden forced me home for a long weekend. My script works, and thats thanks to You.

This is really a happy Monday.

Brgds // Johan
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group