Jump to content

gui input box error


Recommended Posts

gui input box error !

error iniread and inputbox need help!

i can`t find the mistake please help me!

#include <GUIConstants.au3>
#include <IE.au3>
Global $Form1, $Label1, $Number1, $aNumber, $Number2, $bNumber, $fun, $Label2, $Start, $Label3 ,$Label4, $Label5, $Label6, $Label7, $Label8, $Label9, $settings, $Form20, $Save, $Label10, $alter, $age1, $Combo1, $Label2, $mw, $Age, $gender, $oIE, $o_form

Opt("GUIOnEventMode",1)
SoundSetWaveVolume(100)
SoundPlay(@ScriptDir & "\you.mp3",0)
$Form1 = GUICreate("Peter Zahlt! by Nilsdiedose", 479, 252, 314, 176)
GUISetBkColor(0x000000)
$Label1 = GUICtrlCreateLabel("Ihre Nummer:", 0, 0, 100, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFFFF00)
$aNumber = GUICtrlCreateInput("", 0, 48, 161, 29)
GUICtrlSetFont(-1, 20, 400, 0, "Alien Encounters")
GUICtrlSetColor(-1, 0xFF0000)
$bNumber = GUICtrlCreateInput("", 0, 128, 161, 29)
GUICtrlSetFont(-1, 20, 400, 0, "Alien Encounters")
GUICtrlSetColor(-1, 0xFF0000)
$fun = GUICtrlCreatePic("klasse.jpg", 256, 0, 217, 132, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Label2 = GUICtrlCreateLabel("Ihr Gesprächspartner:", 0, 80, 159, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFFFF00)
$Start = GUICtrlCreateButton("Start", 0, 184, 129, 33, 0)
GUICtrlSetFont(-1, 14, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
GUICtrlSetOnEvent($Start,"tele")
$Label3 = GUICtrlCreateLabel("Vorwahl+Ihre Nummer", 0, 24, 159, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x00FF00)
$Label4 = GUICtrlCreateLabel("Vorwahl+Gesprächpartners Nummer", 0, 104, 252, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x00FF00)
$Label5 = GUICtrlCreateLabel("Drücke Start um zu Telefonieren", 0, 160, 234, 24)
GUICtrlSetFont(-1, 11, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFFFF00)
$Label6 = GUICtrlCreateLabel("Mit diesem Tool könnt ihr Kostenlos", 256, 136, 220, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x0000FF)
$Label7 = GUICtrlCreateLabel("Telefonieren! Leider nur von", 256, 160, 181, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x0000FF)
$Label8 = GUICtrlCreateLabel("Festnetz zu Festnetz!", 256, 184, 133, 22)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x0000FF)
$Label9 = GUICtrlCreateLabel("Viel Spaß! Wünscht euch euer Nilsdiedose! Have FUN", 40, 224, 393, 27)
GUICtrlSetFont(-1, 12, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x00FF00)
$settings = GUICtrlCreateButton("Settings", 144, 192, 89, 25, 0)
GUICtrlSetFont(-1, 10, 400, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0x008000)
GUICtrlSetOnEvent($settings,"settings")
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE,"OnExit")


func settings()
$Form20 = GUICreate("Settings", 224, 167, 371, 149)
GUISetBkColor(0x000000)
$Save = GUICtrlCreateButton("Save", 0, 112, 145, 25, 0)
GUICtrlSetOnEvent($save,"save2")
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0xFF0000)
$Label10 = GUICtrlCreateLabel("Alter:", 0, 0, 60, 31)
GUICtrlSetFont(-1, 14, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
$Age = GUICtrlCreateInput("", 0, 32, 145, 21)
$mw = GUICtrlCreateCombo("", 0, 88, 145, 25)
GuiCtrlSetData($mw, "Männlich|weiblich")
$Label2 = GUICtrlCreateLabel("Männlich oder weiblich?", 0, 56, 222, 31)
GUICtrlSetFont(-1, 14, 800, 0, "Comic Sans MS")
GUICtrlSetColor(-1, 0xFF0000)
GUISetState(@SW_SHOW)
GUISetOnEvent(-3, "xxitme")
GUISetState()
endfunc
    






func tele1()
$gender = IniRead("settings.ini", "Männlich oder weiblich?", "m or w", m)
$Age = IniRead("settings.ini", "Alter", "alter", 34)
$Age = IniRead("settings.ini", "Meins", "Meine Nummer", 0000000)
$Age = IniRead("settings.ini", "Deins", "Target", 0000000)


$oIE = _IECreate('http://www.peterzahlt.de')
If @error Then Exit
_IELoadWait($oIE)

If $CmdLine[0] > 0 Then  $aNumber = $CmdLine[1]
If $CmdLine[0] > 1 Then  $bNumber = $CmdLine[2]
If $CmdLine[0] > 2 Then  $Age = $CmdLine[3]
If $CmdLine[0] > 3 Then  $gender = $CmdLine[4]

$o_form = _IEGetObjById($oIE, "aAge")
If _IEFormElementGetValue($o_form) = "?" Then
    _IEImgClick($oIE, "images/common/home/icon_inputRefresh.gif", "src")
    _IEFormElementSetValue($o_form, $Age)
    $o_form = _IEFormGetObjByName($oIE, "frmCall")
    Sleep(1000)
    _IEFormElementRadioSelect($o_form, $gender, "aGender", 1, "byValue")
    _IEImgClick($oIE, "images/de/home/btn_submit.gif", "src")

    $o_form = _IEGetObjById($oIE, "txtPhoneA")
    _IEFormElementSetValue($o_form, $aNumber)
    $o_form = _IEGetObjById($oIE, "txtPhoneB")
    _IEFormElementSetValue($o_form, $bNumber)
    _IEFormImageClick($oIE, "images/de/home/btn_callForFree.gif", "src")
Else
    $o_form = _IEGetObjById($oIE, "txtPhoneA")
    _IEFormElementSetValue($o_form, $aNumber)
    $o_form = _IEGetObjById($oIE, "txtPhoneB")
    _IEFormElementSetValue($o_form, $bNumber)
    _IEFormImageClick($oIE, "images/de/home/btn_callForFree.gif", "src")
EndIf

endfunc


func xxitme()
GUIDelete($Form20)
    endfunc
    
func save2()
    GUICtrlRead($mw)
    if $mw = "Männlich" then
        $gender = "m"
    else
        $gender = "f"
    endif
    iniwrite("settings.ini", "Männlich oder weiblich?", "m or w", $gender)
    GUICtrlRead($Age)
    iniwrite("settings.ini", "Alter", "alter", $Age)
    call("xxitme")
    endfunc 

func tele()
    SoundSetWaveVolume(0)
    GUICtrlRead($aNumber)
    GUICtrlRead($bNumber)
    iniwrite("settings.ini", "Meins", "Meine Nummer", $aNumber)
    iniwrite("settings.ini", "Deins", "Target", $bNumber)
    call("tele1")
endfunc

func OnExit()
    SoundSetWaveVolume(100)
    Exit
endfunc


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd
Link to comment
Share on other sites

gui input box error !

error iniread and inputbox need help!

i can`t find the mistake please help me!

Inadequate error description!

Too much code with too little symptom definition!

Script appears to spam a web site at peterzahlt.de!

No soup for you!!!

<_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

no it`s a script that put the telephone numbers age and femal or man but it gives error its not a spam tool!

my roblem ist that he the gui inputs didnt read out somthing is wrong pls help me!

here

func save2()
    GUICtrlRead($mw)
    if $mw = "Männlich" then
        $gender = "m"
    else
        $gender = "f"
    endif
    iniwrite("settings.ini", "Männlich oder weiblich?", "m or w", $gender)
    GUICtrlRead($Age)
    iniwrite("settings.ini", "Alter", "alter", $Age)
    call("xxitme")
    endfunc

func tele()
    SoundSetWaveVolume(0)
    GUICtrlRead($aNumber)
    GUICtrlRead($bNumber)
    iniwrite("settings.ini", "Meins", "Meine Nummer", $aNumber)
    iniwrite("settings.ini", "Deins", "Target", $bNumber)
    call("tele1")
endfunc
Link to comment
Share on other sites

You are not saving the data to a variable, and then the ControlID is being saved to the .ini file instead of the data.

Func save2()
    $sData = GUICtrlRead($mw)
    if $sData = "Männlich" then
        $gender = "m"
    else
        $gender = "f"
    endif
    iniwrite("settings.ini", "Männlich oder weiblich?", "m or w", $gender)
    $sData = GUICtrlRead($Age)
    iniwrite("settings.ini", "Alter", "alter", $sData)
    call("xxitme")
EndFunc

Func tele()
    SoundSetWaveVolume(0)
    $sData = GUICtrlRead($aNumber)
    iniwrite("settings.ini", "Meins", "Meine Nummer", $sData)
    $sData = GUICtrlRead($bNumber)
    iniwrite("settings.ini", "Deins", "Target", $sData)
    call("tele1")
endfunc

<_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...