Jump to content

Unterminated String error


gahhon
 Share

Recommended Posts

7 minutes ago, faustf said:

for draw a GUI you can use  koda , in scite alt+m  or tool -- koda , after open i suggest pin it in toolbar , or you can use a isn autoit if you find in google you see is good framewoork for draw a gui also if i prefer koda :D (the old habits is hard to die)

good

 

My tool menu don't have koda selection.

Do I have download anything else?

Link to comment
Share on other sites

1 minute ago, faustf said:

i run in win 7 sp1 and  you ??

ofcourse return me login error because user and pass in not correct

Indeed. Because I can't just simply give away the login credential LOL.

I am running Window 10 and IE Version 11.

The expected result would be have new tab out instead of new window.

Link to comment
Share on other sites

--> IE.au3 T3.0-2 Warning from function _IEGetObjByName, $_IESTATUS_NoMatch (Name: userName, Index: 0)
--> IE.au3 T3.0-2 Warning from function _IEGetObjByName, $_IESTATUS_NoMatch (Name: passWd, Index: 0)
--> IE.au3 T3.0-2 Warning from function _IEGetObjById, $_IESTATUS_NoMatch (loginButton)
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEFormElementSetValue, $_IESTATUS_InvalidDataType
--> IE.au3 T3.0-2 Error from function _IEAction(click), $_IESTATUS_InvalidDataType

It shows this error

Link to comment
Share on other sites

you attach ?.

this code for me  work in windows 10 and windows 7 

#include <IE.au3>


Call ("LoginKiss918Jack")
Call ("LoginKiss918Vongola")

Func LoginKiss918Jack ()
Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1)

Local $username = _IEGetObjByName ($oBrowser, "userName")
Local $password = _IEGetObjByName ($oBrowser, "passWd")

Local $button = _IEGetObjById ($oBrowser, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "ABcd")
_IEAction ($button, "click")

EndFunc

Func LoginKiss918Vongola ()
Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1)

Local $username = _IEGetObjByName ($oBrowser, "userName")
Local $password = _IEGetObjByName ($oBrowser, "passWd")

Local $button = _IEGetObjById ($oBrowser, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "AB12")
_IEAction ($button, "click")

EndFunc

i use autoit 32 bit version also in windows 10 64 and in win 7 33 bit

Edited by faustf
Link to comment
Share on other sites

also i suggest  if  you want run   both  login  jack  and vongola

#include <IE.au3>


Call ("LoginKiss918Jack")
Call ("LoginKiss918Vongola")

Func LoginKiss918Jack ()
Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer  <--- 0111 visible explorer

Local $username = _IEGetObjByName ($oBrowser, "userName")
Local $password = _IEGetObjByName ($oBrowser, "passWd")

Local $button = _IEGetObjById ($oBrowser, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "ABcd")
_IEAction ($button, "click")

EndFunc

Func LoginKiss918Vongola ()
Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1)

Local $username = _IEGetObjByName ($oBrowser2, "userName")
Local $password = _IEGetObjByName ($oBrowser2, "passWd")

Local $button = _IEGetObjById ($oBrowser2, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "AB12")
_IEAction ($button, "click")

EndFunc

 

Edited by faustf
Link to comment
Share on other sites

4 minutes ago, faustf said:

also i suggest  if  you want run   both  login  jack  and vongola

#include <IE.au3>


Call ("LoginKiss918Jack")
Call ("LoginKiss918Vongola")

Func LoginKiss918Jack ()
Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1)

Local $username = _IEGetObjByName ($oBrowser, "userName")
Local $password = _IEGetObjByName ($oBrowser, "passWd")

Local $button = _IEGetObjById ($oBrowser, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "ABcd")
_IEAction ($button, "click")

EndFunc

Func LoginKiss918Vongola ()
Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1)

Local $username = _IEGetObjByName ($oBrowser2, "userName")
Local $password = _IEGetObjByName ($oBrowser2, "passWd")

Local $button = _IEGetObjById ($oBrowser2, "loginButton")

_IEFormElementSetValue ($username, "TEST")
_IEFormElementSetValue ($password, "AB12")
_IEAction ($button, "click")

EndFunc

 

Do you have other suggestion on doing this so?

Because I am still showing the Jack one, but not Vongola one.

After I change the Vongola to Browser2 it don't have errors on the log already.

Link to comment
Share on other sites

Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer  <--- 0111 visible explorer

show

Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) ; <--- 0011 invisible explorer  <--- 0111 visible explorer

not show  but do the dirty work i promes :D, if you wanna  look   change  0 to  1

 

Edited by faustf
Link to comment
Share on other sites

4 minutes ago, faustf said:
Global $oBrowser = _IECreate ("https://kiosk.918kiss.com/", 0, 1, 1, 1) ; <--- 0011 invisible explorer  <--- 0111 visible explorer

show

Global $oBrowser2 = _IECreate ("https://kiosk.918kiss.com/", 0, 0, 1, 1) ; <--- 0011 invisible explorer  <--- 0111 visible explorer

not show  but do the dirty work i promes :D, if you wanna  look   change  0 to  1

 

Yeah. That's will show, but as in 2 different windows already LOL

Link to comment
Share on other sites

18 hours ago, gahhon said:

I have look through the link you given. But I don't see related commands that I can open browser as in Firefox or Google Chrome, and also how to set the value into the HTML element and trigger Login button?

I don't think you can have a visible browser window (atleast a proper one) with multiple tabs when you are using web driver interface. I did not use it before so I do not know much about it.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

11 minutes ago, gahhon said:

Since IE can't make a new tab.

Are you sure? :)

Spoiler
#include <IE.au3>

Global $objIE, _
       $arrURLs[2] = ["www.google.com", "www.youtube.com"]


$objIE = _IECreate()
If @error Then
    ConsoleWrite("Error during the creation of IE object. Error: " & @error & @CRLF)
    Exit
Else
    For $i = 0 To UBound($arrURLs) - 1 Step 1
        $objIE.navigate2($arrURLs[$i], 2048)
    Next

    Sleep(10000)
    _IEQuit($objIE)
EndIf

 

Thanks to Navigate2 method, and the parameter navOpenInNewTab, you can do it ;)

Edited by FrancescoDiMuro
Added links for the OP

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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