Sign in to follow this  
Followers 0
asdfmovie99e

I have a Problem

3 posts in this topic

I wrote the following scipt:

 

#NoTrayIconay
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <EditConstants.au3>


global $fortschritt

Opt("GUIOnEventMode", 1)

MsgBox(0,"333999","Wenn dies dein erster Programmstart ist gebe 333999 ein")



GUICreate("333999 Helper V1.0", 350, 420, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUICtrlCreateLabel("Fortschrittscode", 10, 13, 100, 20)
$fortschritt = GUICtrlCreateInput("", 130, 10, 100, 20)
GUICtrlSetState(-1, $GUI_ENABLE)
GUICtrlRead(-1,
GUICtrlCreateButton("GO", 250, 10 ,60, 20)
GUICtrlSetOnEvent(-1, "_ButtonFortschritt")
GUISetState()
sleep(10000000)

Func _exit()
   Exit
   endfunc

   Func _ButtonFortschritt()
  If $fortschritt = 333999 Then msgbox(0, "333999Helper", "Wie ich sehe hast du das Programm runtergeladen. Gebe nun den Code 679534 ein")
   FileWriteLine(".Baum.txt",$fortschritt)

endfunc
 

Now i have a very big problem. no matter what i type in in the var $fortschritt is 4.

What is wrong in the script help please

Share this post


Link to post
Share on other sites



asdfmovie99e,

Welcome to the AutoIt forum. :)

 

no matter what i type in in the var $fortschritt is 4.

That is because the variable $fortschritt contains the ControlID of the input. This is the index of the internal Autoit array that holds data about that control. if you want to see what is in the control then you need to use GUICtrlRead($fortschritt). :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanks for help

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  
Followers 0