SciTE4AHK gone berserk!

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
johnhill
Posts: 24
Joined: 25 Sep 2014, 18:46

SciTE4AHK gone berserk!

21 Nov 2014, 09:40

Hi all,

Every time I run script on SciTE4AHK, it gone berserk. It also affected the .ahk. It start to delete itself or adding ;~ in front in the script. Could someone have a look?

Code: Select all

#NoEnv
#SingleInstance force
#NoTrayIcon
SetBatchLines -1
SendMode Input  
SetWorkingDir %A_ScriptDir% 
SetWinDelay 0
SetMouseDelay 0
SetKeyDelay 0
BlockInput On


; run task manager
Run C:\Windows\System32\taskmgr.exe ; SendInput ^+{Esc} 
	WinWait Task Manager 
WinMove, Task Manager , , 1970, 30, 294, 1053

; close hyper
ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\hyper.png
	SendInput {Click %foundx%, %foundy%}{Del}
	Sleep 100
	
; close abbyy
ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\abbyy.png
	SendInput {Click %foundx%, %foundy%}{Del}
	Sleep 100
	
; close oms
ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\oms.png
	SendInput {Click %foundx%, %foundy%}{Del}
	Sleep 100

; close excel
WinActivate Microsoft Excel
SendInput ^s
	sleep 100
ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\excel.png
	SendInput {Click %foundx%, %foundy%}{Del}
	Sleep 100
	
; close scheduler
ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\scheduler.png
	if ErrorLevel = 1
		ImageSearch, foundx, foundy, 0, 0, %A_ScreenWidth%, %A_ScreenHeight%, D:\image\schedulerbg.png
	SendEvent {Click %foundx%, %foundy%}{Del}
	Sleep 100
	
; close 1.txt
WinClose 1.txt - Notepad
SendInput {Left}{Enter}
	Sleep 100
	
; close work
WinClose work
	Sleep 100
	
; close personalisation
WinClose Personalization
	Sleep 100
	
; BlockInput Off
ExitApp
F8:: ExitApp
MegaloDon
Posts: 107
Joined: 22 Jul 2014, 17:54

Re: SciTE4AHK gone berserk!

24 Nov 2014, 19:51

Not sure what your problem is and I have no intention of running your script to test it. I see no need to open the task manager GUI and send commands to that (seems like asking for trouble). The easiest way to kill a task is by using the DOS command 'taskkill'. Just open a command prompt and type taskkill /?. That will give you instructions on how to use it.
User avatar
AlphaBravo
Posts: 586
Joined: 29 Sep 2013, 22:59

Re: SciTE4AHK gone berserk!

24 Nov 2014, 23:11

use Process instead of automating TaskMgr
User avatar
joedf
Posts: 9000
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: SciTE4AHK gone berserk!

25 Nov 2014, 01:25

+1 Process command
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
MegaloDon
Posts: 107
Joined: 22 Jul 2014, 17:54

Re: SciTE4AHK gone berserk!

26 Nov 2014, 19:19

AlphaBravo wrote:use Process instead of automating TaskMgr
I was not aware of the Process command (Still new to AHK). Seems to be the equivalent of taskkill but with more options and you don't have to use an external DOS command. +2 :D

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], peter_ahk and 371 guests