Golfboy

Background process

15 posts in this topic

My thread got locked, unfrotunately. So here another thread without "game automation".

 

I have been looking for a program that can keep my other programs up to date and I found AutoIt. I have no coding experience. I can just read it a little bit so it was quite hard to actually get something done but after watching a few videos I finally got it working!

Especially the zip part was quite hard since I dont understand what I have to do with the "Zip UDF premade concepts" that users provide. At the end I just did it with Mouseclicks.

 

So now the prgram is working as you can see in the video but I would like to do this in the background. It's not really important for this task but I would like to create more with AutoIt since I think the program is fantastic!

 

so my question is: How can I improve my code and get it to the background so I can do other stuff while AutoIt is busy?

 

Here is the video for the code and how it works.

 

Share this post


Link to post
Share on other sites



Hurry change your question more or Yoda the Ban Hammer will lock it again. ;)

Share this post


Link to post
Share on other sites
37 minutes ago, Nikolas92 said:

Hurry change your question more or Yoda the Ban Hammer will lock it again. ;)

But why....

 

there is nothing about game automation. I'm just asking how I can improve the code and how I can get the process to the background :'(

Share this post


Link to post
Share on other sites

You should read the forum rules, particularly this section --

Quote

Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above.

 

Share this post


Link to post
Share on other sites
1 hour ago, Nikolas92 said:

Hurry change your question more or Yoda the Ban Hammer will lock it again. ;)

Please refrain from these type of comments and simply report when you feel you need to act upon this. thanks.

Jos


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

Share this post


Link to post
Share on other sites

@Golfboy,

1 hour ago, Golfboy said:

My thread got locked, unfrotunately. So here another thread without "game automation".

Funny you now say you create a thread with game automation  while you stated before in PM it wasn't about game automation at all.
Nikolas92 is right about not re-opening a thread on the same topic in general, but I will let this go as long as it is about general software updates.

Jos


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

Share this post


Link to post
Share on other sites

@Jos

Sorry I meant Another threah but this time without Game automation. My English is not great.

 

Thanks that the thread can stay :D

Share this post


Link to post
Share on other sites
1 hour ago, Nikolas92 said:

Hurry change your question more or Yoda the Ban Hammer will lock it again. ;)

This is the second or third time I have seen you posting like this - not sure if you're under the mistaken impression that it's clever or funny. Continue with this and and you can personally experience the hammer.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

50 minutes ago, JLogan3o13 said:

This is the second or third time I have seen you posting like this - not sure if you're under the mistaken impression that it's clever or funny. Continue with this and and you can personally experience the hammer.

Second, dont care about impression. Since I rarely get useful answers on my questions I dont really care whose 'hammer' I will get, not much will change... :drool:

Edited by Nikolas92

Share this post


Link to post
Share on other sites

Attack is the best defense approach?

7 days to think about that last post whether that is the way you want to continue here or not.

Jos


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

Share this post


Link to post
Share on other sites
11 hours ago, Jos said:

Gaat prima hoor!

Jos

Kijk, dat is nu nog eens makkelijk :D

 

How many times a day (If this is even allowed) can I up the thread? Didn't find a rule about this in the forum rules.

Share this post


Link to post
Share on other sites

Hi @Golfboy,

you may have a look at forum netiquette too: http://www.autoitscript.com/wiki/FAQ#What_is_proper_forum_etiquette.3F_What_rules_are_there_for_the_forum.3F

But even there I didn’t find a clear statement about bumping posts. I’m using this forum for a long time and I saw a lot of times admins ask for not bumping posts within 24 hours. So wait a day and you’ll be fine I think.

Conrad


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Share this post


Link to post
Share on other sites

But this does not mean you aren’t allowed to give updates. If you found out something you didn’t post before but could be important for answering feel free to post. While experimenting yourself with your problem and narrowing it is important for the community too. 

If you have something relevant to add post it. If not wait 24 hours. We are a lot of people here but sometimes the one who can answer the question is offline for some days.


SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

InetGet (call ("Downloading"), "RPCS3", 0, 0)

; Getting to the download page and download it (with renaming)
Func Downloading ()
Run("C:\Program Files\Internet Explorer\iexplore.exe -new https://rpcs3.net/download")
WinWait ("[CLASS:IEFrame; TITLE:RPCS3 - Download - Internet Explorer]")
Sleep (1000)
ControlClick ("[CLASS:IEFrame; TITLE:RPCS3 - Download - Internet Explorer]", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "Left", 1, 696, 784)
WinWait ("[CLASS:IEFrame]")
Sleep (2000)
ControlClick ("[CLASS:IEFrame]", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "Left", 1, 604, 312)
Sleep (2000)
ControlClick ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "Left", 1, 822, 54)
Sleep (100)
ControlSend ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "{Down down}")
Sleep (100)
ControlSend ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "{Down up}")
Sleep (100)
ControlSend ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "{Down down}")
Sleep (100)
ControlSend ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "{Down up}")
Sleep (100)
ControlSend ("[CLASS:IEFrame]", "", "[CLASS:DirectUIHWND; INSTANCE:1]", "{ENTER}")
WinWait ("[CLASS:#32770; Title:Opslaan als]")
ControlSend ("[CLASS:#32770; Title:Opslaan als]", "", "[CLASS:Edit; Instance:1]", "RPCS3")
Sleep (100)
ControlClick ("[CLASS:#32770; Title:Opslaan als]", "", "[CLASS:Button; INSTANCE:2]", "Left")
EndFunc

; Wait till file is done downloading

Do

Sleep (100)
Until FileExists ( "C:\Users\User\Downloads\RPCS3.zip")


; Unzipping and correct folder
Run ("explorer.exe")
WinWait ("[CLASS:CabinetWClass; Title:Verkenner]")
ControlClick ("[CLASS:CabinetWClass; Title:Verkenner]", "", "[CLASS:SysTreeView32; INSTANCE:1]", "Left", 1, 85, 76)
Sleep (200)
controlsend ("[CLASS:CabinetWClass; Title:Verkenner]", "", "[CLASS:SysTreeView32; INSTANCE:1]", "{ENTER}")
Sleep (200)
ControlClick ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "Left", 1, 150, 38)
Sleep (200)
ControlClick ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "right", 1, 150, 38)
Sleep (500)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{Right down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{Right up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN down}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{DOWN up}")
Sleep (50)
ControlSend ("[CLASS:CabinetWClass; Title:Downloads]", "", "[CLASS:DirectUIHWND; INSTANCE:3]", "{ENTER}")
Sleep (400)
ControlSend ("[CLASS:#32770; TITLE:&Uitpakken : C:\Users\User\Downloads\RPCS3.zip]", "", "[CLASS:Edit; INSTANCE:1]", "L:\Hyperspin\Emulators")
Sleep (50)
ControlClick ("[CLASS:#32770; TITLE:&Uitpakken : C:\Users\User\Downloads\RPCS3.zip]", "", "[CLASS:ComboBox; INSTANCE:3]")
sleep (200)
ControlSend ("[CLASS:#32770; TITLE:&Uitpakken : C:\Users\User\Downloads\RPCS3.zip]", "", "[CLASS:ComboBox; INSTANCE:3]", "o")
Sleep (200)
ControlSend ("[CLASS:#32770; TITLE:&Uitpakken : C:\Users\User\Downloads\RPCS3.zip]", "", "[CLASS:ComboBox; INSTANCE:3]", "{ENTER}")
Sleep (200)
ControlClick ("[CLASS:#32770; TITLE:&Uitpakken : C:\Users\User\Downloads\RPCS3.zip]", "", "[CLASS:Button; INSTANCE:7]", "LEFT")
Sleep (5000) ; Waiting to unzip

; delete zip file
FileDelete("C:\Users\User\Downloads\RPCS3.zip")


; close internet explorer

WinActivate ( "[CLASS:IEFrame]")
sleep (200)
Send ( "!{F4}")
Sleep (100)
Send ( "{ENTER}")
Sleep (500)


; Close explorer

WinActivate ( "[CLASS:CabinetWClass; Title:Downloads]")
sleep (200)
Send ( "!{F4}")

Got this currently! Its getting bigger and bigger :P

 

So instead of Mouseclick and Send I changed everything to ControlClick and ControlSend except 2. Those are for the Save As dialog in Internet Explorer. For some reason I can't do it with controlclick. It just highlights it... EDIT: Now it highlights and with 2x down and enter it also works. No Mouseclicks anymore! :lmao:

 

I also have inserted WinWait. When the page is finished loading the automation goes on which is fantastic! Unfortunately the page sometimes still loads while AutoIt thinks it's finished. This is why I put Sleep in it.

 

I didn't hide the whole thing yet. I think It's kinda pointless here because it's short anyways + I found out that with ControlClick (and I hide the automation) I can do other stuff while AutoIt is busy. But if I add ControlSend and I have to type something while the Process is running then I ruin it... Gotta find something for this.

 

thanks @Simpel, I will bump it once a day then :)

 

Some quick translation:

Opslaan als = Save as

Uitpakken = unzip (extract)

Verkenner = explorer

 

Edit:

Ask for a video to see what everything does if the script isn't clear!

Edited by Golfboy

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