Advanced search with quoted string

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Advanced search with quoted string

Re: Advanced search with quoted string

Post by gregster » 29 Dec 2017, 10:48

Another problem is your options string: it doesn't contain spaces: W300H300X342Y198 won't work, I guess.
Try it with Options := "W" GUIwidth " H" GUIheight " X" GUIx " Y" GUIy and Gui, Show, % options

Re: Advanced search with quoted string

Post by gregster » 29 Dec 2017, 10:41

As far as I know, Gui, new doesn't support these options like w, h, x and y. You are probably confusing it with the options for Gui, Show.

The available options for new: https://autohotkey.com/docs/commands/Gui.htm#Options

Re: Advanced search with quoted string

Post by MrMajorThorburn » 29 Dec 2017, 10:26

my test snippet. My original had all the calculations in the GUI, New, line itself. I Would prefer them to be there instead of before.

; GUI New
X1 := 100
Y1 := 100
X2 := 400
Y2 := 400
GUIwidth := X2-X1
FileAppend, %GUIwidth%`n,*
GUIheight := Y2-Y1
FileAppend, %GUIheight%`n,*
dX := 242
dY := 98
GUIx := X1+dX
GUIy := Y1+dY
Options := "W" GUIwidth "H" GUIheight "X" GUIx "Y" GUIy
FileAppend, %Options%`n,*
; next line gives GUI syntax error
GUI, New, Options, "GUI Title"
; And this
GUI, New, % Options, "GUI Title"
; And this
GUI, New, % "W" GUIwidth "H" GUIheight "X" GUIx "Y" GUIy, "GUI Title"

Re: Advanced search with quoted string

Post by gregster » 29 Dec 2017, 09:50

Best would be to show your script.

Apart from that: https://cse.google.com/cse?cx=010629462 ... gsc.page=1
Google Search of the forum is available here: https://autohotkey.com/search/

Advanced search with quoted string

Post by MrMajorThorburn » 29 Dec 2017, 08:28

Since raising a question and it being 'suggested' I do some 'research' and include some forum searches I would like some guidance on how I can get the forum results for a search for a specific string in quotes.
In this case it "GUI, New,"
I am asking as I tried that and got 88 pages and of the first 20 or so pages I checked none of them had that particular sequence of GUI and New.
I wanted to get some assurance that I might actually find an example of someone using GUI, New so I can compare what has been used before.
I am using variables for the X, Y, Width and Height and although I can get a variable to contain all the values and the indicators X,Y,H,W and send it to the console viw FileAppend I still get an invalid option error when using the same syntax in the actual GUI command.

Top