Sign in to follow this  
Followers 0
ahmed9100

small help here

5 posts in this topic

#1 ·  Posted (edited)

i see this script in form and it work great but i neet the web page start heddin

#include

$oIE = _IECreate()
_IENavigate($oIE, "file:///" & @DesktopDir & "\hotspot\login.html")
; get pointers to the login form and username and password fields
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "username")
$o_password = _IEFormElementGetObjByName($o_form, "password")
; Set field values and submit the form
_IEFormElementSetValue($o_login, "ahmed")
_IEFormElementSetValue($o_password, "asdasd")
_IEFormSubmit($o_form)
Exit

i made it to auto login in mikrotik

Edited by ahmed9100

Share this post


Link to post
Share on other sites



Try with this:

#include <IE.au3>

$oIE = _IECreate("file:///" & @DesktopDir & "\hotspot\login.html", 0, 0, 1, 1)
$o_form = _IEFormGetObjByName($oIE, "login")
$o_login = _IEFormElementGetObjByName($o_form, "username")
$o_password = _IEFormElementGetObjByName($o_form, "password")
; Set field values and submit the form
_IEFormElementSetValue($o_login, "ahmed")
_IEFormElementSetValue($o_password, "asdasd")
_IEFormSubmit($o_form)
Exit

Hi!


My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

it works fine Thx

i got another problem when i use the old code on the real mikrotik like (http://www.elzaeam.com/login) it put the user and password but it give me this error

web browser did not send challenge response (try again, enable Javascript)

and when i press ok manually it works ?

is there a problem with submit line ?

Edited by ahmed9100

Share this post


Link to post
Share on other sites

You need to do some error checking. Check the return value and @error of the _IE* functions.

Do you get any error messages in the output pane of SciTE?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

every thing is ok

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "E:Mikrotik hot spot user controlNew AutoIt v3 Script (2).au3" /UserParams

+>05:15:03 Starting AutoIt3Wrapper v.2.1.0.33 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X86)

>Running AU3Check (1.54.22.0) from:C:Program FilesAutoIt3

+>05:15:03 AU3Check ended.rc:0

>Running:(3.3.8.1):C:Program FilesAutoIt3autoit3.exe "E:Mikrotik hot spot user controlNew AutoIt v3 Script (2).au3"

--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop

+>05:15:04 AutoIT3.exe ended.rc:0

>Exit code: 0 Time: 2.138

but i got the same java error !

im making this script for old guys who cant use PC and every time thay enter user and pass

im trying to make it easy for them

Edited by ahmed9100

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