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 with ""

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





PostPosted: Tue Aug 21, 2007 12:50 pm    Post subject: Variable with "" Reply with quote

Iīm try to make a shortcut of I'm feel lucky but, How can i google with "?

Example:
Search for "casa, piscina e jardim"
Not for casa, piscina e jardim
Thank's

This is my script:

Code:
Sorte:
Gui, Destroy
Gui, Add, Edit, x5 y35 w182 h24 vTextoSorte ,
Gui, Add, Button, x6 y64 w54 h24 , &PTBR
Gui, Add, Button, x68 y64 w54 h24 , &World
Gui, Add, Button, x131 y64 w54 h24 , &Cancel
Gui, Add, Text, x5 y5 w182 h25 , Digite o que deseja localizar.
Gui, Show, x356 y257 h95 w194, Estou com sorte
sleep 60000
return

ButtonPTBR:
Gui, Submit
RunWait, http://www.google.com.br/search?hl=pt-BR&q=%TextoSorte%&btnI=Estou+com+sorte&meta=lr`%3Dlang_pt,,Max
Exitapp

ButtonWorld:
Gui, Submit
RunWait, http://www.google.com/search?hl=en&q=%TextoSorte%&btnI=I`%27m+Feeling+Lucky,,MAX
Exitapp
Back to top
lucgod1



Joined: 27 Oct 2006
Posts: 3
Location: BELGIUM

PostPosted: Tue Aug 21, 2007 1:37 pm    Post subject: Re: Variable with "" Reply with quote

lw00 wrote:
Iīm try to make a shortcut of I'm feel lucky but, How can i


Code:
; For Chr(34)... See ASCII code
MyExample = Test
Quote := Chr(34)
Var = %Quote%%MyExample%%Quote%
MsgBox, %Var%

MyExample = Test
Equal := Chr(61)
Var = %Equal%%MyExample%%Equal%
MsgBox, %Var%

MyExample = Test
Quote := Chr(61)
Var = %Quote%%MyExample%%Quote% ; !!!!!!!!
MsgBox, %Var%



BYE.
_________________
lucgod1 (LIEGE - BELGIUM)


Last edited by lucgod1 on Tue Aug 21, 2007 1:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
lw00
Guest





PostPosted: Tue Aug 21, 2007 1:45 pm    Post subject: It doesn't work Reply with quote

Sorry but this wasn't my question.
Itīs important that both options can be used not only one of them.

Both:
"casa, piscina e jardim"
or
casa, piscina e jardim.

If i type with "" they find with "" if not, not!
Thank's
Back to top
BoBoĻ
Guest





PostPosted: Tue Aug 21, 2007 2:54 pm    Post subject: Reply with quote

You've to convert the line to its HTML equivalent.
http://www.google.com.br/search?hl=pt-BR&q=%22casa%2C+piscina+e+jardim%22&btnI=Estou+com+sorte&meta=
Back to top
lw00
Guest





PostPosted: Tue Aug 21, 2007 4:41 pm    Post subject: Not yet Reply with quote

Sorry again.
I don't need to convert the line to HTML or equivalent because the IE or Mozilla do it automatic.
If you put space or " or &, etc... at URL ADDRESS, the brownser convert it automaticaly to HTML format.

I just need that my variable accept symbols like " and run it.
See my example of script.
Back to top
ManaUser



Joined: 24 May 2007
Posts: 901

PostPosted: Tue Aug 21, 2007 6:14 pm    Post subject: Reply with quote

Try to minimize the amount of extraneous in information when you ask for help, it tends to confuse people. Smile This should do it though.
Code:
ButtonWorld:
Gui, Submit
StringReplace, TextoSorte, TextoSorte, ", ""
RunWait, http://www.google.com/search?hl=en&q=%TextoSorte%&btnI=I`%27m+Feeling+Lucky,,MAX
Exitapp

[edit] Actually, come to think of it, BoBoĻ's answer will also work.
Back to top
View user's profile Send private message
lw00
Guest





PostPosted: Tue Aug 21, 2007 7:15 pm    Post subject: Yes! Reply with quote

MonoUser,
Just Bobo"'s answer doesnt work.

But now it's perfect.
Thanks for help and sorry for my english.
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