Jump to content

Display loop count


ssah8
 Share

Recommended Posts

  • Moderators

@ssah8 what have you tried? This forum is dedicated to helping people with their own scripts; it is not a place where people will spoon-feed the code to you. I would start with your GUI. Below is a framework for a simple GUI. Now look in the help file for the different fields you can add to a GUI, and find one that works for displaying your number. Then we can move on to pulling the information from the website.

#include <GUIConstantsEx.au3>

GUICreate("Test", 300, 300)

GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

GUIDelete()

 

Edit: And seeings as you have this topic open, please (before anyone else adds anything to this thread) explain how this post is different from this one:

 

Edited by JLogan3o13

"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

  • Moderators

And again, how is this different from your previous thread, which seems to be asking the same question?

"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

  • Moderators
6 minutes ago, ssah8 said:

I am very new to AutoIT (I started yesterday). The helpfile doesn't really makes sense to me. So Im asking here.

BTW, you are not going to get very far if you are unwilling to put in the effort. You need to post what in the help file is not making sense, and we can help clarify. No one is going to do it for you.

"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, ssah8 said:

I am very new to AutoIT (I started yesterday). The helpfile doesn't really makes sense to me.

Beginners should first learn how to use the hammer, before trying to build a house of wood. So i suggest work through the relevant examples (_IE*, Gui* and Adlib in helpfile) to get the knowledge. After this you should know waht to do or ask with showing your script which doesn't what you want.

Link to comment
Share on other sites

  • Moderators
4 hours ago, JLogan3o13 said:

please (before anyone else adds anything to this thread) explain how this post is different from this one:

@AutoBert what part of this slipped by you? When a Mod is clearly asking questions as to the legitimacy of a thread, please stay out of it.

"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

  • Moderators

Topics merged as the questions seem very similar, and you cannot seem to answer the simplest of questions.

"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

Hello.

I was having some problems creating a loop counter. Could anyone help?

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <MsgBoxConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Login Boost copy", 297, 191, 192, 121)
$name = GUICtrlCreateInput("Username", 16, 32, 121, 21)
$pass = GUICtrlCreateInput("Password", 16, 72, 121, 21)
$repeat = GUICtrlCreateInput("Times", 16, 112, 65, 21)
$button = GUICtrlCreateButton("Start", 168, 32, 107, 105)
GUICtrlSetFont(-1, 17, 400, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("Copyright, #### #######", 16, 152, 127, 17)
$counter = GUICtrlCreateLabel(0, 220, 152, 127, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

         Case $button
            Global $NameFromUser = GUICtrlRead($name)
            Global $PassFromUser = GUICtrlRead($pass)
            Global $Number = GUICtrlRead($repeat)
            Global $counter1 = GUICtrlRead($counter)

            MsgBox(0, "Started", "The bot has started", 1)
            Global $oIE = _IECreate("https://sms14.schoolsoft.se/engelska/jsp/Login.jsp?eventMessage=ERR_Not_Logged_In")
            For $i = 1 To $Number



               $oForm = _IEFormGetObjByName($oIE, 'userForm')
               $webName = _IEFormElementGetObjByName($oForm, "ssusername")
               $webPass = _IEFormElementGetObjByName($oForm, "sspassword")
               $dropdown = _IEFormElementGetObjByName($oForm, "usertype")
               $loginbutton = _IEFormElementGetObjByName($oForm, "button")

               _IEFormElementSetValue($webname, $NameFromUser)
               _IEFormElementSetValue($webPass, $PassFromUser)
               _IEFormElementOptionSelect($dropdown, 'Student', 1, 'byText')
               _IEFormSubmit($oForm)

               _IELinkClickByText($oIE, "Log out")

               $counter1 = $counter1 +1


            Next
            _IEQuit($oIE)

            MsgBox(0, "Complete", "The bot has completed", 5)





    EndSwitch
WEnd

 

Edited by Melba23
Code anonymized
Link to comment
Share on other sites

  • Developers
5 minutes ago, ssah8 said:

I was having some problems creating a loop counter. Could anyone help?

Care to elaborate what you exactly want and what this script is supposed to do?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

It's just a fun project. That website shows the login count and I want to boost that number. It's not something important, I just do it for fun and to practise AutoIT.

Edited by ssah8
added some words
Link to comment
Share on other sites

I have never asked this question. I asked how to make a loop work, and I didn't get an answer so I had to figure it out myself.

Could you please just tell me how to make the counter work? 

Edited by ssah8
Link to comment
Share on other sites

  • Developers

I see you were told before by a Mod not to create multiple topics, so consider this your last warning as we do not appreciate people ignoring us much.

Topics merged and you might consider stopping this line of questioning as you haven't been able to clearly explain your intentions.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Listen, I am not going into any debate with you and made myself clear. 
Consider this topic closed as you elected to question my action, and you better not open any new topic that even closely resembles this topic.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...