Jump to content

Recommended Posts

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
Posted

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

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
Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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
×
×
  • Create New...