Jump to content
Sign in to follow this  
closeupman

Error In Expression

Recommended Posts

closeupman

Why do I get the error for this $password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0 , ,$WS_EX_TOOLWINDOW)

?

I cut n copied the GuiCreate from the help file and substituted exactly.

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>



dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password



$password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0 , ,$WS_EX_TOOLWINDOW)
GUISetState (@SW_SHOW)    ; will display an empty dialog box

 sleep(10000)
Edited by closeupman

Share this post


Link to post
Share on other sites
MHz

You have a blank parameter in GUICreate

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>



dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password



$password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0, $WS_EX_TOOLWINDOW)
GUISetState (@SW_SHOW)   ; will display an empty dialog box

sleep(10000)

Share this post


Link to post
Share on other sites
closeupman

Oh ok, I thought u had to have the , , there for exstyle parameter. I didn't specify.

Btw, do you know how to get rid of the start button and taskbar.

I want my GUI to cover the whole screen and if possible not allow alt+tab

Thanks

:">

You have a blank parameter in GUICreate

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>
dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password
$password_windowID=GUICreate ( "User Authorization" , 800 , 600 , 0 , 0, $WS_EX_TOOLWINDOW)
GUISetState (@SW_SHOW)  ; will display an empty dialog box

sleep(10000)

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites
MHz

Change GUISetState (@SW_SHOW) to GUISetState (@SW_MAXIMIZE).

Unsure of disable Alt + Tab

Share this post


Link to post
Share on other sites
SlimShady

You guys skipped a parameter and used an "extended style" for the "normal style" paramater.

It's better to use variables with clear names if you use a function with many parameters.

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>



dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password


$GUI_WIDTH = 800
$GUI_HEIGHT = 600

;To center the dialog on the screen, use -1 instead of 0 for the next 2 params.
$GUI_LEFT = 0
$GUI_TOP = 0

;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN)
$GUI_STYLE = 0x0
$GUI_EXSTYLE = $WS_EX_TOOLWINDOW

$password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE)
GUISetState (@SW_SHOW)    ; will display the dialog box

sleep(5 * 1000)
Edited by SlimShady

Share this post


Link to post
Share on other sites
closeupman

Change GUISetState (@SW_SHOW) to GUISetState (@SW_MAXIMIZE).

Unsure of disable Alt + Tab

<{POST_SNAPBACK}>

Ok, thanks. Should've thought of that..duh! :idiot:

Share this post


Link to post
Share on other sites
closeupman

Thanks. I did the no no of just typing as creating instead of designing properly.

Thanks for the better version.

Edit:

Though for some reason your version won't let me hide the start and/task bar on the bottom of the screen, even when i've changed it below as specified by the other user (i.e. SW_MAXIMIZE).

It works though with MY code...strange.

Also if i do maximize, I would guess I don't need to specify any coordinate settings?

Slim can u take a look at my Abc post and give me a critique and/or a rewrite?

Thanks

:idiot:

You guys skipped a parameter and used an "extended style" for the "normal style" paramater.

It's better to use variables with clear names if you use a function with many parameters.

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>
dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password
$GUI_WIDTH = 800
$GUI_HEIGHT = 600

;To center the dialog on the screen, use -1 instead of 0 for the next 2 params.
$GUI_LEFT = 0
$GUI_TOP = 0

;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN)
$GUI_STYLE = 0x0
$GUI_EXSTYLE = $WS_EX_TOOLWINDOW

$password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE)
GUISetState ([B]@SW_MAXIMIZE[/B])  ; will display the dialog box

sleep(5 * 1000)

<{POST_SNAPBACK}>

Edited by closeupman

Share this post


Link to post
Share on other sites
Radsam

The following will maximize your window, remove the title bar, and cover over your start menu.

$GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP
$GUI_EXSTYLE = -1

Share this post


Link to post
Share on other sites
closeupman

Thanks, that did that, but the title bar is still there. I want my screen to cover the full monitor without showing the title bar. Should I just make it bigger than the screen rather than maximizing? (I would rather not do this...I just tried it and it worked)/

If not, How about removing the minimize button? and getting rid of the A icon in the upper left.

Please see my other post about Minizmize and ABC's

Also, do you know any way to disable alt+tab? and the right clicking?

I would like any advice you can give. Even if you can't answer all.

Thanks

:idiot:

The following will maximize your window, remove the title bar, and cover over your start menu.

$GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP
$GUI_EXSTYLE = -1

<{POST_SNAPBACK}>

Edited by closeupman

Share this post


Link to post
Share on other sites
Radsam

WS_POPUP works for me. Copy the below code and try it.

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>



dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password


$GUI_WIDTH = 800
$GUI_HEIGHT = 600

;To center the dialog on the screen, use -1 instead of 0 for the next 2 params.
$GUI_LEFT = 0
$GUI_TOP = 0

;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN)
$GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP
$GUI_EXSTYLE = -1

$password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE)
GUISetState (@SW_SHOW)  ; will display the dialog box

sleep(5 * 1000)
Edited by Radsam

Share this post


Link to post
Share on other sites
sykes

Works for me too


We have enough youth. How about a fountain of SMART?

Share this post


Link to post
Share on other sites
closeupman

Ya...weird...that does work, thanks....maybe I copied it wrong b4. Or maybe I switch the params in the GuiCreate. Does it matter if u have exstyle b4 style?

I was able to do a similar thing by just making the screen really huge and putting negative left and top parameters.

Btw, I was able to figure out how to disable ALT+TAB switching by myself....woohooo. :idiot:

Thanks for your help

:D

WS_POPUP works for me. Copy the below code and try it.

;* create a window
;* password must be entered in a certain time frame
;* or computer is shutdown
#include <GUIConstants.au3>
dim $password_windowID
dim $labelID
dim $editboxID
dim $userInput

dim $password
$GUI_WIDTH = 800
$GUI_HEIGHT = 600

;To center the dialog on the screen, use -1 instead of 0 for the next 2 params.
$GUI_LEFT = 0
$GUI_TOP = 0

;To use more than 1 style, use BitOR. eg: BitOR($DTS_TIMEFORMAT, $DTS_RIGHTALIGN)
$GUI_STYLE = $WS_MAXIMIZE+$WS_POPUP
$GUI_EXSTYLE = -1

$password_windowID=GUICreate ( "User Authorization" , $GUI_WIDTH, $GUI_HEIGHT, $GUI_LEFT, $GUI_TOP, $GUI_STYLE, $GUI_EXSTYLE)
GUISetState (@SW_SHOW) ; will display the dialog box

sleep(5 * 1000)

<{POST_SNAPBACK}>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.