Sign in to follow this  
Followers 0
nilsidedose

Get error

2 posts in this topic

source

#include <GUIConstants.au3>
Opt("GUIOnEventMode",1)

$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)
$Number1 = GUICtrlCreateInput("", 0, 48, 161, 29)
GUICtrlSetFont(-1, 20, 400, 0, "Alien Encounters")
GUICtrlSetColor(-1, 0xFF0000)
$aNumber = GUICtrlRead($Number1)
$fun = GUICtrlCreatePic("", 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")
$Number2 = GUICtrlCreateInput("", 0, 128, 161, 29)
GUICtrlSetFont(-1, 20, 400, 0, "Alien Encounters")
GUICtrlSetColor(-1, 0xFF0000)
$bNumber = GUICtrlRead($Number2)
$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("Mir 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)
GUISetState(@SW_SHOW)
GUISetOnEvent($GUI_EVENT_CLOSE,"OnExit")

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd


#include <IE.au3>
Dim $aNumber, $bNumber, $oIE, $Age, $gender, $o_form

func OnExit()
    Exit
    endfunc

func tele()
$Age = "34"
$gender = "m"

$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

Share this post


Link to post
Share on other sites



Try Moving the following line to the top of the file

#include <IE.au3>

WARNING: The web site acsessed by the script displays lots of advertising pop-up and cookies


"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook

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