Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 07:36

  • Please register to post and access all features, it's quick, easy and FREE!


[REQUEST] AutoIt Script

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2012
Posts: 377
Received Thanks: 162
[REQUEST] AutoIt Script

Hey,i'm new at AutoIt and i need ascript that do something wwhen a proces close.
I tried this,but didint worked:

If ProcessClose("iexplore.exe") then MsgBox(1,"sada","dwqda")

Can someone help me?



CantShutMyMouth is offline  
Old 06/23/2012, 20:17   #2
 
elite*gold: 0
Join Date: Mar 2011
Posts: 8,643
Received Thanks: 3,454
PHP Code:
While 1
   
If Not ProcessExists("firefox.exe"Then
      MsgBox
(0,"","")
      
ExitLoop
   
EndIf
   
Sleep(200)
WEnd 


Freddy​ is offline  
Thanks
1 User
Old 06/23/2012, 22:22   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,139
Code:
$Process = "iexplore.exe"
$Exists = False

While Sleep(10)
	If ProcessExists($Process) And Not $Exists Then $Exists = True
	
	If $Exists And Not ProcessExists($Process) Then
		;...
		$Exists = False
	EndIf
WEnd
KDeluxe is offline  
Thanks
1 User
Old 06/24/2012, 08:38   #4
 
elite*gold: 0
Join Date: Apr 2012
Posts: 377
Received Thanks: 162
Thanks Both.



There's another request:

If i have a process like iexplore.exe do nothing but if another iexplore.exe opens then auto close it.
Can someone help me with this script?


CantShutMyMouth is offline  
Old 06/24/2012, 12:04   #5
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,139
How could we help you, if you do nothing?


The IE creates a new child process for each tab. If you run the IE, there will be two tabs and two processes. If you close one, the other one will be closed too. It's easy to change that, but it's your turn now.
KDeluxe is offline  
Thanks
1 User
Old 06/24/2012, 14:37   #6
 
elite*gold: 0
Join Date: Apr 2012
Posts: 377
Received Thanks: 162
Thanks a lot Kdeluxe.

Actually my program doesn't start 2 processes,so your script was enough without any changes,only the $Process.

But i want to learn,so i will try to make it work to iexplore.exe too.
I just love to learn AutoIt,hope in 1 year i will know enough to make my own scripts
CantShutMyMouth is offline  
Old 06/25/2012, 08:06   #7
 
elite*gold: 0
Join Date: Jan 2012
Posts: 1,458
Received Thanks: 1,406
Quote:
Originally Posted by CantShutMyMouth View Post
Thanks a lot Kdeluxe.

Actually my program doesn't start 2 processes,so your script was enough without any changes,only the $Process.

But i want to learn,so i will try to make it work to iexplore.exe too.
I just love to learn AutoIt,hope in 1 year i will know enough to make my own scripts
You just needa read the help file few times... Make some newb scripts...after that go higher and higher
Try to compete with ya ... get higher and higher... Exceed ur limits :P
Hybrid~ is offline  
Old 06/25/2012, 10:52   #8
 
elite*gold: 0
Join Date: Apr 2012
Posts: 377
Received Thanks: 162
Thanks Hybryd.

I made some begginer scripts before i started to those one... i made LuckyNumber game in AutoIt.
But i didn;t know how to make those one in this post,and i needed them,i didn't made then to learn.


Edit: What am I doing wrong here?:

PHP Code:
While (1)
   If 
Not ProcessExists("crossfire_downloader.exe"then
     MsgBox
(1,"blah blah","blah blah"
   If 
MsgBox(1,"blah blah","blah blah")then ProcessClose("explorer.exe")
   If 
Not ProcessExists("explorer.exe"Then
      MsgBox
(1,"blah blah","blah blah")
   EndIf
   
ExitLoop
   Sleep
(200)
WEnd 
I know i can use strings,not this is the problem
CantShutMyMouth is offline  
Old 06/25/2012, 15:15   #9



 
elite*gold: 0
The Black Market: 485/0/0
Join Date: Jan 2012
Posts: 12,568
Received Thanks: 2,980
PHP Code:
While 1
    
If ProcessExists("crossfire_downloader.exe"Then
    MsgBox
(1"Windows Open""Open")
    
ProcessClose("explorer.exe")
Else
    
MsgBox(1"Windows Closed""Closed")
EndIf

WEnd 
Maybe you mean that?
Lumi is offline  
Old 06/30/2012, 20:23   #10
 
elite*gold: 0
Join Date: Apr 2012
Posts: 377
Received Thanks: 162
There is why i needed those scripts....to make this:

There is a hack called M2bob,and i've got a crack of it... But the crack has some bugs:

It opens more game clients,when i need only 1 client.

And,my little sister usually stop my bot when she come to PC,so i needed the ne with MsgBox when ProcessNotExists.

Now,this is how i used them,and that's what i learned in 2 weeks only.

PHP Code:
$Form1 GUICreate("M2Bob helper"31475192124)
$Button1 GUICtrlCreateButton("Nu opri BOB-ul!"241610020)
$Button2 GUICTRLCreateButton ("Doar un proces"200,16,100,20)
$Button3 GUICTRLCREATEBUTTON ("Exit",120,50,100,20)
GUISetState(@SW_SHOW)
While 
1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
    
Case $Button1
            _Hack
()
    Case 
$Button2
            _Hack2
()
    Case 
$button3
            _Hack3
()
    EndSwitch
WEnd

Func _Hack
()
   
GUISetState(@SW_SHOW)
   While 
1
   
If Not ProcessExists("M2Bob 1.3.2.exe"Then
      MsgBox
(1,"Nu","Nu opri BOB-ul!!!!")
     
      
ExitLoop
   
EndIf
   
Sleep(200)
WEnd  
EndFunc

Func _Hack2
()
   
GUISetState(@SW_SHOW)
   
$Process "metin2client.bin"
$ProcessId 0
$Exists 
False

While Sleep(10)
    If 
Not $Exists Then $ProcessId ProcessExists($Process)
    If (
$ProcessId 0) And (Not $ExistsThen $Exists True

    
If ($Exists) And (Not ProcessExists($ProcessId)) Then
        $Exists 
False
    
ElseIf ($Exists) And (ProcessExists($ProcessId)) Then
        $ProcessList 
ProcessList($Process)
        If 
$ProcessList[0][0] > 1 Then
            
For $i 1 To $ProcessList[0][0]
                If 
$ProcessList[$i][1] <> $ProcessId Then
                    ProcessClose
($ProcessList[$i][1])
                EndIf
            
Next
        
EndIf
    EndIf
WEnd
EndFunc

Func _Hack3
()
   While 
1
      ProcessClose 
("Bobhelper.exe")
   
Wend
EndFunc 

Do you guys think is good for only 2 weeks of learning?


And a login bot made with no help
PHP Code:
Func _username() 
   
Send("username")
EndFunc

Func _password
()
   
Send("pass")
EndFunc   
While sleep(200)
Hotkeyset("{F1}","_username")
Hotkeyset("{F2}","_password")
WEnd 

I know those scripts are EASY ,but i'm using AutoIt for only 2 weeks....
CantShutMyMouth is offline  
Old 07/01/2012, 01:05   #11
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,139
Copy&Paste != learning
KDeluxe is offline  
Old 07/01/2012, 01:09   #12
 
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,257
Quote:
Originally Posted by KDeluxe View Post
Copy&Paste != learning
Hmmmm Wenn die Leute es nötig haben...


Logtetsch is offline  
Reply



« 4 Byte in Float konvertieren mit AutoIT | Omegle Chat Bot »

Similar Threads
[Request] Battle Punks AutoIt-Script
08/26/2010 - Facebook - 1 Replies
Hi guys :) This is a request cause i dont know how to build a workin AutoIt-Script. I could use simple Mouserecorderthingys but every tool i tryed didnt worked at all. so could some awesome AutoIt Scripter pls build a script for Battle Punkt which can: Fight automaticly (Scans for Win or Loose) If Loose -> get new set if enemys Cooking food and use it after its ready
[Request] Simple AutoIt Script
06/26/2008 - Dekaron - 5 Replies
Hello, I'm looking for an autoit script that basically presses 1 2 3 4 5, one after the other every second continuously. Thanks in advance, EW.



All times are GMT +1. The time now is 07:36.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.