Advanced search with quoted string

Discuss issues and requests related with the forum software
MrMajorThorburn
Posts: 22
Joined: 20 Dec 2017, 13:07

Advanced search with quoted string

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.
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Advanced search with quoted string

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/
MrMajorThorburn
Posts: 22
Joined: 20 Dec 2017, 13:07

Re: Advanced search with quoted string

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"
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Advanced search with quoted string

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
Last edited by gregster on 29 Dec 2017, 10:51, edited 1 time in total.
gregster
Posts: 8990
Joined: 30 Sep 2013, 06:48

Re: Advanced search with quoted string

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

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 25 guests