Search found 1761 matches

by Albireo
21 Jan 2015, 11:18
Forum: Ask for Help (v1)
Topic: Can AHK do that? - PowerShell can!
Replies: 4
Views: 3778

Re: Can AHK do that? - PowerShell can!

Thanks for your ideas! First! Why this code works on WinXP and not on Win7, RunWait %LabelProgPath%\import32.exe /m "%ImpScriptPath%\%ImportScriptName%" /B was the name of the program library. (on XP.: c:\program\.. - on Win7.: c:\program files\...) - a space in the name in win7. The solution was Ru...
by Albireo
20 Jan 2015, 18:55
Forum: Ask for Help (v1)
Topic: Can AHK do that? - PowerShell can!
Replies: 4
Views: 3778

Can AHK do that? - PowerShell can!

Hello! I want to automatically run a program (Import32.exe) as convert a CSV file to a database. It was no problem with Windows XP, but with Win 7 (or later) I got problem with UAC, (It must be run as Administrator). The entire script, which handles the data is written in AHK. Only at the last momen...
by Albireo
09 Dec 2014, 17:44
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

Thanks! But I don't get EnableUIAccess to work. :? (My AHK is version is 1.1.16.05 and Windows 7 64-bit swe) I get no error message when the EXE-file is created with "EnableUIAccess", or the created EXE-file is running. Does it make any difference where the program "EnableUIAccess" is installed? The...
by Albireo
08 Dec 2014, 14:36
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

Thank´s for EnableUIAccess maybe, this is my solution. The only downside I can see, is that you always have to remember to create a new EXE-file adapted to a specific computer. Been thinking about another option which I didn't manage, get to work. Simply automatically answer "yes" when "User Access ...
by Albireo
30 Nov 2014, 09:58
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

Did you try to run your script as administrator, too? Many thanks! Haven't really thought about it. I thought UAC window, always would opens if the need existed. If i run the script as administrator, the "Send F2" works. (Maybe even WinMaximize - haven't tested yet). But now opens the window "User ...
by Albireo
29 Nov 2014, 07:12
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

Could it be a setting in Windows 7? To get Label32.exe to work well, the program must be run in administrator mode (some changes are made to the windows registry at times.) If I create a scheduled task for my program, with administrator rights, and run that task from AHK, I don't need to disable UAC...
by Albireo
28 Nov 2014, 06:15
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

Thank you for the explanation! Had intended to use the command (without spaces), like this! IfWinExist "ahk_class TMainForm" But maybe it's the same thing as applies? The value for the command must have parenthesis? (as you described?) _________________ SetTitleMatchMode 2 Process Exist, Label32.exe...
by Albireo
27 Nov 2014, 10:33
Forum: Ask for Help (v1)
Topic: PID (Process ID), of a running program.
Replies: 3
Views: 11765

Re: PID (Process ID), of a running program.

Now I found a solution.

Run the following command.

Code: Select all

RunWait c:\windows\system32\schtasks.exe /run /tn Skyltprogram,, MAX
It works!

//Jan
by Albireo
27 Nov 2014, 10:08
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Re: Close a running program - doesn't work!

If WinExist "ahk_class TMainForm" . If you want to call the WinExist function, you have to add parentheses: If WinExist ( "ahk_class TMainForm" ) Thanks! Both works for me! I got the message "The program is found!" in both case. (but nothing more) I thought that parentheses is only needed when "OR"...
by Albireo
27 Nov 2014, 09:51
Forum: Ask for Help (v1)
Topic: Close a running program - doesn't work!
Replies: 16
Views: 5939

Close a running program - doesn't work!

Hi! I try to close a program. The program I run, is called "Label32.exe *32" in the task manager. The program is made for 32-bit, WinXP, and this computer have Win7 64-bit, but it works fine in Win7. It have ahk_class = TMainForm (from Window Spy) When I try to close "Label" with the following comma...
by Albireo
27 Nov 2014, 07:15
Forum: Ask for Help (v1)
Topic: PID (Process ID), of a running program.
Replies: 3
Views: 11765

Re: PID (Process ID), of a running program.

You have right! The prossess doesn't exist When the program is running, I can see in the task manager (win7) .: Label32.exe *32 If I use the code below (the code right now) SetTitleMatchMode 2 Run c:\windows\system32\schtasks.exe /run /tn Skyltprogram,, MAX, LabelPID ; Run Label32.exe from the sched...
by Albireo
26 Nov 2014, 09:20
Forum: Ask for Help (v1)
Topic: PID (Process ID), of a running program.
Replies: 3
Views: 11765

PID (Process ID), of a running program.

Hi!
I want to get the process ID of a running program (as possible to find in the task manager).
I have tested

Code: Select all

Process Exist, Label32.exe
PID := ErrorLevel
MsgBox 64, Row %A_LineNumber% -> %A_ScriptName%, PID = %PID%
But I only got "0" as result

//Jan
by Albireo
25 Nov 2014, 11:55
Forum: Ask for Help (v1)
Topic: How can AHK and PowerShell be joined - Win7
Replies: 7
Views: 4637

Re: How can AHK and PowerShell be joined - Win7

TLDR Are you aware that you can make a GUI in Powershell? I guess it's just a question of, 'do you learn how to make the GUI in Powershell or learn how to do the e-mails in AHK?'. Yes, but feel more "at home" with AutoHotkey. Have tried to find good forum to discuss PowerShell, but the forums I "te...
by Albireo
24 Nov 2014, 17:20
Forum: Ask for Help (v1)
Topic: How can AHK and PowerShell be joined - Win7
Replies: 7
Views: 4637

Re: How can AHK and PowerShell be joined - Win7

Thank You! But it must be rewritten in some way. (I don't understand everything, what is going on in the script.) 1. I want to be able to enter the reply address (from) in the mail. User <mail3@xxxxx.se> (I don't use BCC and CC) 2. Should be able to use Swedish characters as "ÅÄÖ" in Subject and bod...
by Albireo
24 Nov 2014, 08:44
Forum: Ask for Help (v1)
Topic: How can AHK and PowerShell be joined - Win7
Replies: 7
Views: 4637

How can AHK and PowerShell be joined - Win7

Hi! I'm writing a PowerShell script that will be able to send e-mails. But I intend to use AHK to handle input with GUI. How must the information be handled between the AHK and PowerShell / AHK? _.-._.-_.-._.-_.-._.-_.-._.-_.-._.-_.-._.-_.-._.-_.-._.-_.-._.-_.-._.- One way (doesn't feel good - but i...
by Albireo
22 Oct 2013, 14:49
Forum: Ask for Help (v1)
Topic: Check changes
Replies: 4
Views: 2592

Re: Check changes

Great!
Thanks!
by Albireo
22 Oct 2013, 14:13
Forum: Ask for Help (v1)
Topic: Check changes
Replies: 4
Views: 2592

Re: Check changes

Thanks! it seems to work! Maybe can be done in a simpler way! #NoEnv #SingleInstance force SetBatchLines -1 SetWorkingdir %A_ScriptDir% AutoTrim On Var1 = u Var2 = u Var1 = o1%Var1% Var2 = o2%Var2% If !(( InStr(Var1, "u") and InStr(Var2, "u") ) or ( !InStr(Var1, "u") and !InStr(Var2, "u") )) MsgBox ...
by Albireo
22 Oct 2013, 13:49
Forum: Ask for Help (v1)
Topic: Check changes
Replies: 4
Views: 2592

Check changes

Hello! I have two variables, Var1 and Var2. Both variables contain text information. I want to check if the variables contain the letter "u" if only one variable contain "u", should some things be done if both variables contain "u" or both lacks "u", nothing shall be done. How can I make the check? ...
by Albireo
17 Oct 2013, 10:10
Forum: Ask for Help (v1)
Topic: Change the image name in the GUI!
Replies: 6
Views: 3116

Re: Change the image name in the GUI!

Thanks for the answers!

This one with "GUICONTROL" works fine!

//jan
by Albireo
16 Oct 2013, 16:46
Forum: Ask for Help (v1)
Topic: Change the image name in the GUI!
Replies: 6
Views: 3116

Re: Change the image name in the GUI!

Thank You! But MsgBox, 4,, Want to change the name of the image? %A_LoopFileName% is not so good - I want to see the image before I know if I want to change the name of the image. In the subroutine ButtConfirm the file name is changed ButtKonfirm: Gui Submit, NoHide NewImageName = %Path%%NewImageNam...

Go to advanced search