Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

auto close program


  • Please log in to reply
7 replies to this topic

#1 BlackCat

BlackCat

    Seeker

  • Active Members
  • 13 posts

Posted 17 September 2009 - 08:57 AM

Hi... Today, I want make code auto close other program (example: yahoo!messenger) but I can't find it. Any body know it, help me plz.
Thanks







#2 Manadar

Manadar

         

  • MVPs
  • 10,776 posts

Posted 17 September 2009 - 09:03 AM

The function you're looking for is ProcessClose or WinClose. Don't be shy to consult the help file for these issues.

#3 Mecrazycoder

Mecrazycoder

    Member

  • Active Members
  • PipPip
  • 113 posts

Posted 17 September 2009 - 09:05 AM

Hi... Today, I want make code auto close other program (example: yahoo!messenger) but I can't find it. Any body know it, help me plz.
Thanks

First try to read the help file before posting the questions. Any way i think below will help you a little
] if ProcessExists("iexplore.exe") Then     ProcessClose("iexplore.exe") EndIf

Assuming Program as Process

Edited by Mecrazycoder, 17 September 2009 - 09:07 AM.

Attitude is a little thing that makes a big difference

Posted Image


#4 BlackCat

BlackCat

    Seeker

  • Active Members
  • 13 posts

Posted 19 September 2009 - 03:45 AM

Thanks
But I want it close after 1hour 15minutes

Edited by BlackCat, 19 September 2009 - 04:10 AM.


#5 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,815 posts

Posted 19 September 2009 - 05:04 AM

Sleep(4500000) If ProcessExists("iexplore.exe") Then     ProcessClose("iexplore.exe") EndIf

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.


#6 erm3nda

erm3nda

    Seeker

  • Active Members
  • 17 posts

Posted 15 June 2014 - 08:11 AM

Sleep(4500000) If ProcessExists("iexplore.exe") Then     ProcessClose("iexplore.exe") EndIf

Can you show an example that don't freezes the script?
I mean like asycronous timeout to a window.


~ SELF SIGNED ~

How much warning points do i need to get my free spicy hammon?


#7 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 16,823 posts

Posted 15 June 2014 - 08:19 AM

The year is 2014! Don't necro old threads please.

Edited by guinness, 15 June 2014 - 12:01 PM.

Example List: _AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_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()_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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 20/07/2014


#8 ravkr

ravkr

    Seeker

  • Active Members
  • 13 posts

Posted 15 June 2014 - 11:48 AM

AdlibRegister('close', 4500000) ; run func every 1h 15m ; your code here While 1     ; or here     ConsoleWrite('.')     Sleep(1000) WEnd Func close()     AdlibUnRegister('close') ; unregister func so it won't close program after next 1h 15m     If ProcessExists("iexplore.exe") Then         ProcessClose("iexplore.exe")     EndIf EndFunc

sunmoon_v1_count.gif





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users