did you check the 'MainWindowTitle' property?
loop through all processes and check their window title with that, you can also do it manually using win API calls
I would like to check if X window of a program is running, if it is not running, I want to end the current application.
Thanks for who can help.
did you check the 'MainWindowTitle' property?
loop through all processes and check their window title with that, you can also do it manually using win API calls
I don't really understand what you were trying to say but if you want to know whether the program is still running or not, you can check at the top. you can see 'STOP' icon. Thats mean, the program still running.
If you want the code to close the running program, you can use this .
Application.Exit()
Anything can PM me. I'm from Malaysia.
If the return value is IntPtr.Zero then the window was not found, and you can use Application.Exit() as mentioned above to exit out of the window.Code:Private Declare Auto Function FindWindow Lib "user32.dll" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String _ ) As IntPtr
Ah we-a blaze the fyah, make it bun dem!
Hi,
There's a coding website for my college. But it doesn't allow copy pasting. I do the programming in online compiler because the compiler in that website is way too slow. So after writing the code, I'm having to retype the entire code.
I tried writing a script to do this. Can someone help me with it?
I paste the code to be typed into "contents.txt" and I have another background ahk file that runs this file when I press Ctrl+Alt+v.
Code:*[Select all]*[Download]GeSHi*©*Codebox Plus
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
FileRead, code, contents.txt
SendInput {Raw}%code%(SendInput)
If you just want to throw the contents of the file onto the screen you can try using PHP.
<?php
$myfilename = "mytextfile.txt";
if(file_exists($myfilename)){
echo file_get_contents($myfilename);
}
?>