Sign in to follow this  
Followers 0
krake8001

AutoIt Script Instantly Stopping Without An Error Message

16 posts in this topic

#1 ·  Posted (edited)

Hey there!

 

Im currently trying to make a custom auto login using an Array!

 

I'm fairly new to AutoIt but I worked out this Code:

#include <Array.au3>
#include <Misc.au3>
#RequireAdmin
Local $Array2D[3][3]

HotKeySet("{ENTER}", "TogglePause")

Global $Paused = False
While 1
    If $Paused = True Then
        Blockinput(1)
        $i = 2
        $rows = UBound($Array2D) - 1
          while $i < $rows
            MouseClick("left",$Array2D[$i][1],$Array2D[$i][2], 1)
            $i = $i + 1
          wend
         Blockinput(0)
         Exit
           ElseIf _IsPressed("01") Then
             $rows = UBound($Array2D)
             ReDim $Array2D[$rows + 1][3]
             $pos = MouseGetPos()
             $posX = $pos[0]
             $posY = $pos[1]
             $Array2D[$rows -1][1] = $posX
             $Array2D[$rows -1][2] = $posY
             Sleep(100)
    EndIf
WEnd

Func TogglePause()
    $Paused = True
    EndFunc
It worked very well but then I tried to add left clicks to it.

Looks like this:

#include <Array.au3>
#include <Misc.au3>
#RequireAdmin
Local $Array2D[3][4]

HotKeySet("{ENTER}", "TogglePause")

Global $Paused = False
While 1
    If $Paused = True Then
        Blockinput(1)
        $i = 2
        $rows = UBound($Array2D) - 1
          while $i < $rows
            MouseClick($Array2D[$i][3],$Array2D[$i][1],$Array2D[$i][2], 1)
            $i = $i + 1
          wend
          sleep(3000)
         Blockinput(0)
         Exit
           ElseIf _IsPressed("01") Then
             $rows = UBound($Array2D)
             ReDim $Array2D[$rows + 1][3]
             $pos = MouseGetPos()
             $posX = $pos[0]
             $posY = $pos[1]
             $Array2D[$rows -1][1] = $posX
             $Array2D[$rows -1][2] = $posY
             $Array2D[$rows -1][3] = "left"
             Sleep(100)

             ElseIf _IsPressed("02") Then
             $rows = UBound($Array2D)
             ReDim $Array2D[$rows + 1][3]
             $pos = MouseGetPos()
             $posX = $pos[0]
             $posY = $pos[1]
             $Array2D[$rows -1][1] = $posX
             $Array2D[$rows -1][2] = $posY
             $Array2D[$rows -1][3] = "right"
             Sleep(100)
    EndIf
WEnd

Func TogglePause()
    $Paused = True
    EndFunc
Since then it doesn't work anymore!

It returns this:

>"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Admin\Downloads\Bot\Array.au3" /UserParams    
+>01:12:26 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0   Keyboard:00000407  OS:WIN_7/Service Pack 1  CPU:X64 OS:X64    Environment(Language:0407)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Admin\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Admin\AppData\Local\AutoIt v3\SciTE
>Running AU3Check (3.3.12.0)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Admin\Downloads\Bot\Array.au3
+>01:12:26 AU3Check ended.rc:0
>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\Admin\Downloads\Bot\Array.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
+>01:12:26 AutoIt3.exe ended.rc:0
+>01:12:26 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 0.5291
I don't have any Idea why it does that. Pls help! Edited by Melba23
Added codetags
1 person likes this

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

What are you trying to automate here?

EDIT: code removed, per guinness' advice

Edited by mpower

Share this post


Link to post
Share on other sites

mpower,

This appears to be bot related if the name of the script is anything to go by. Perhaps it would have been wise to report (as I did) or point the user in the direction of the Forum rules. Of course the name could be innocent, but lets first make it known that we don't tolerate this type of coding whatsoever.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

mpower,

This appears to be bot related if the name of the script is anything to go by. Perhaps it would have been wise to report (as I did) or point the user in the direction of the Forum rules. Of course the name could be innocent, but lets first make it known that we don't tolerate this type of coding whatsoever.

 

guinness, I fully agree, hence why I specifically asked the user as to what they are trying to automate. Until such time that it can be undoubtedly proven that the user is automating games I think its okay to respond.

Innocent until proven guilty right? "Bot" could stand for a wide range of things :). Anyway I removed any code I posted from my post above so as not to potentially help a game automation coder.

Edited by mpower

Share this post


Link to post
Share on other sites

There is absolutely nothing in that script that indicates game interaction.

Please be patient and wait for a mod to decide.

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Please respect the rules outlined by Jon and enforced by the Mods.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Guys, Please don't argue here in open forum.

The thread is reported which is enough.

Now give the OP time to respond and we will act if necessary.

Jos

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I'm trying to make a program which records a login saves it and repeats all steps. I want to do it like this and not with controlclick because I want it to work with every Login and Computer. I know that it Botters are a huge problem of Au3 but I told you that it's not a Bot (It could be used as such but I am coding it for myself my IT-teacher and maybe friends and family). Pls don't make evryone that uses Mouseklick and stuff to a suspect. 

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

 

By the way. I'm not even sure if I will use it much because I'm writing this script for fun and to learn Au3.

Edited by krake8001

Share this post


Link to post
Share on other sites

Ok may take about 10 minutes.

Share this post


Link to post
Share on other sites
 

I figured it out myself. Thank you.

Share this post


Link to post
Share on other sites

I'm trying to make a program which records a login saves it and repeats all steps. I want to do it like this and not with controlclick because I want it to work with every Login and Computer. I know that it Botters are a huge problem of Au3 but I told you that it's not a Bot (It could be used as such but I am coding it for myself my IT-teacher and maybe friends and family). Pls don't make evryone that uses Mouseklick and stuff to a suspect. 

Read the questions we ask as you want, but recording the steps and keys typed during logon is also something we don't want to do as that fits the Keylogger profile. ;)

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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