[Problem With Input]

04/09/2015 15:56 HaMaDa..#1
#Solved Thanks To ►D3v1n3r
Quote:
Originally Posted by ►D3v1n3r View Post
Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form2 = GUICreate("", 496, 143, -1, -1)
$Input1 = GUICtrlCreateInput("", 232, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$Button2 = GUICtrlCreateButton("Back", 240, 112, 107, 25)

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 621, 357, -1, -1)
$Button1 = GUICtrlCreateButton("Show", 24, 40, 131, 25)
GUISetState(@SW_SHOW)
#EndRegion

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
                GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form2)

	    Case $Button2
               GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form1)
	EndSwitch
WEnd
04/09/2015 16:43 alpines#2
In that script I don't see any error but your error is that you access a variable before it is declared.

Something like this
Code:
MsgBox(0,0, $s)
$s = "asd"
04/09/2015 16:50 HaMaDa..#3
Its not the full script,
Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form2 = GUICreate("", 496, 143, -1, -1)
$Input1 = GUICtrlCreateInput("", 232, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$Button2 = GUICtrlCreateButton("Back", 240, 112, 107, 25)

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 621, 357, -1, -1)
$Button1 = GUICtrlCreateButton("Show", 24, 40, 131, 25)
GUISetState(@SW_SHOW)
#EndRegion

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
                GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form2)

	    Case $Button2
               GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form1)
	EndSwitch
WEnd
04/09/2015 17:05 TheMokko#4
Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$Form2 = GUICreate("", 496, 143, -1, -1)
$Input1 = GUICtrlCreateInput("", 232, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$Button2 = GUICtrlCreateButton("Back", 240, 112, 107, 25)

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 621, 357, -1, -1)
$Button1 = GUICtrlCreateButton("Show", 24, 40, 131, 25)
GUISetState(@SW_SHOW)
#EndRegion

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
                GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form2)

	    Case $Button2
               GUISetState(@SW_Hide, "S4Client.exe")
		GUISetState(@SW_SHOW, $Form1)
	EndSwitch
WEnd
04/09/2015 18:19 HaMaDa..#5
Thank you deviner also thank you alpines. <3
deviner its work but what you have changed?
04/09/2015 18:31 alpines#6
You have a linebreak in front of the BitOr.
04/09/2015 18:39 HaMaDa..#7
Code:
$Input1 = GUICtrlCreateInput("", 232, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
Also that's will be error i dont know what he have changed.
04/09/2015 19:01 Moneypulation#8
Quote:
Originally Posted by HaMaDa.. View Post
Code:
$Input1 = GUICtrlCreateInput("", 232, 88, 121, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
Also that's will be error i dont know what he have changed.
You shouldn't delete your main post. It can be helpful for people having the same problem
04/09/2015 19:06 HaMaDa..#9
Okay.