Jump to content

My program does'nt wok in another pc


Recommended Posts

Why not take advantage of the _IE functionality?

 

$oIE = _IECreate("https://mybanner.qu.edu.qa/PROD/twbkwbis.P_WWWLogin")
$oForm = _IEFormGetObjByName($oIE, "loginform")
$oElement = _IEFormElementGetObjByName($oForm, "sid")
_IEFormElementSetValue( $oElement, "user" )
$oElement = _IEFormElementGetObjByName($oForm, "PIN")
_IEFormElementSetValue( $oElement, "pass" )
_IEFormSubmit($oForm)

 

Edited by genius257
Link to comment
Share on other sites

34 minutes ago, genius257 said:

Why not take advantage of the _IE functionality?

 

$oIE = _IECreate("https://mybanner.qu.edu.qa/PROD/twbkwbis.P_WWWLogin")
$oForm = _IEFormGetObjByName($oIE, "loginform")
$oElement = _IEFormElementGetObjByName($oForm, "sid")
_IEFormElementSetValue( $oElement, "user" )
$oElement = _IEFormElementGetObjByName($oForm, "PIN")
_IEFormElementSetValue( $oElement, "pass" )
_IEFormSubmit($oForm)

 

Tyyy very much , but is there is any way to make it detect Images on another pc ?

Link to comment
Share on other sites

38 minutes ago, genius257 said:

Why not take advantage of the _IE functionality?

 

$oIE = _IECreate("https://mybanner.qu.edu.qa/PROD/twbkwbis.P_WWWLogin")
$oForm = _IEFormGetObjByName($oIE, "loginform")
$oElement = _IEFormElementGetObjByName($oForm, "sid")
_IEFormElementSetValue( $oElement, "user" )
$oElement = _IEFormElementGetObjByName($oForm, "PIN")
_IEFormElementSetValue( $oElement, "pass" )
_IEFormSubmit($oForm)

 

And please let me know where you got "loginform"

Link to comment
Share on other sites

  • Moderators

@AutoBert in the future if you have an issue with something posted, how about simply reporting it rather than having a fit in-thread? Then, a member of the Mod team can review to see if the executable is actually an issue (which it isn't in this case).

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

1 hour ago, abdulrahmanok said:

Tyyy very much , but is there is any way to make it detect Images on another pc ?

I guess, but why? :)

1 hour ago, abdulrahmanok said:

And please let me know where you got "loginform"

I used page inspector to find the form element and the attribute "name" (that i needed for this example) had the value "loginform". In FireFox and Chrome right click on element and press inspect element. In IE i think it's F12 to bring up the inspector. And seems like Edge also with right click->inspect element

Link to comment
Share on other sites

1 hour ago, genius257 said:

I guess, but why? :)

Actually for 2 reasons : 

1- before 5 years I was like Autoit to much but I after I couldn't share Any of my Programs with another PC I left Autoit...

2- My Current Project Needs to Image Search To much Even After I made it Auto Login because of your help I'm still need to Image search...

Link to comment
Share on other sites

I don't quite understand what your first reason is, sorry :/

To your second reason I'm curious if the image search is within the browser, and if so, i don't think there is a need. Unless the site uses java or flash i would think that the _IE functionality is perfect for almost anything within a homepage?

Link to comment
Share on other sites

3 minutes ago, genius257 said:

I don't quite understand what your first reason is, sorry :/

To your second reason I'm curious if the image search is within the browser, and if so, i don't think there is a need. Unless the site uses java or flash i would think that the _IE functionality is perfect for almost anything within a homepage?

Im stuck now in some Java Script so i need to Imagefind :(

Code :

<INPUT TYPE="submit" VALUE=" Next">

THats all information about it ..........

Link to comment
Share on other sites

26 minutes ago, abdulrahmanok said:

Code :

<INPUT TYPE="submit" VALUE=" Next">

THats all information about it ..........

you could do something like:

$oInputs = _IETagNameGetCollection($oForm, "input")
For $oInput In $oInputs
    If ( $oInput.Type == "submit" ) And ( $oInput.Value == " Next" ) Then
        _IEAction($oInput, "Click")
        ExitLoop
    EndIf
Next

 

Link to comment
Share on other sites

8 hours ago, genius257 said:

you could do something like:

$oInputs = _IETagNameGetCollection($oForm, "input")
For $oInput In $oInputs
    If ( $oInput.Type == "submit" ) And ( $oInput.Value == " Next" ) Then
        _IEAction($oInput, "Click")
        ExitLoop
    EndIf
Next

 

Unfortunately Error
 

clickonlick.au3" (47) : ==> Variable must be of type "Object".:
For $oInput In $oInputs
For $oInput In $oInputs^ ERROR

 

Edited by abdulrahmanok
Link to comment
Share on other sites

After Reading about Problem :

 


"So finally unlocked. Shortly after I entered the mail, came to me the riddle solution.
And the site has the login noted when the user has not gone to Logoff, but the browser
Simply closed, he landed the next time on the next page. On which there is no object "username"
gives. So he could not find you and that was the problem. I then simply constructed the following:
 

source code

$ OInputs = _IETagNameGetCollection ($ oIE, "input")

For $ oInput in $ oInputs

If $ oInput.name = "newid" then exit; newid declares an object on the following page

If $ oInput.type = "text" And $ oInput.name = "username" Then $ oUser = $ oInput

If $ oInput.type = "password" And $ oInput.name = "password" Then $ oPass = $ oInput

If isObj ($ oUser) And isObj ($ oPass) then exitloop

Next

Now the program is finished, the object "newid" should be present on the page. And that is in mineCase only if the user has not used a logoff. Otherwise, the program continues to run and enters everything."

I think Solution is Here but I'm still don't understand where is it !


 

Link to comment
Share on other sites

  • Moderators

@abdulrahmanok please wait at least 24 hours before bumping your posts. This may be the most important thing in the world for you, but you need to exercise a little patience - the person best equipped to answer your question may not be online right now.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Finally After 3-5 Hours of searching Found This :
 

$oLinks = _IETagNameGetCollection($oIE, "input")
For $oLink In $oLinks
    If String($oLink.type) = "submit" And String($oLink.value) = " Next" Then
          _IEAction($oLink, "click")
          ExitLoop
    EndIf
Next

Its worked like a charm Thank you @genius257  For Your Help

Solved.

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...