Search found 32 matches

by chinagreenelvis
07 Sep 2018, 08:01
Forum: Ask For Help
Topic: Need to reduce the CPU usage of a script. Topic is solved
Replies: 2
Views: 158

Need to reduce the CPU usage of a script. Topic is solved

I have this script running at all times in order to close out unneeded Adobe programs that linger after using various software. The problem is that it constantly uses about 0.1 to 0.8% CPU in the task manager. Is there a better way to organize this so it's less hungry? ; Adobe Process Manager ; by c...
by chinagreenelvis
14 Jun 2018, 22:32
Forum: Ask For Help
Topic: XML: Is there a simpler way of doing this?
Replies: 0
Views: 170

XML: Is there a simpler way of doing this?

SysGet, Monitor, Monitor XMLFile = %A_AppData%\Winamp\studio.xnf FileRead, XMLData, %XMLFile% XML := ComObjCreate("MSXML2.DOMDocument.6.0") XML.async := False XML.loadXML(XMLData) XMLNodes := XML.selectNodes("//entry") For XMLNode in XMLNodes { Loop % XMLNode.attributes.length { AttName := XMLNode....
by chinagreenelvis
04 May 2018, 11:06
Forum: Ask For Help
Topic: Using A_Args and contains Topic is solved
Replies: 4
Views: 204

Re: Using A_Args and contains Topic is solved

Using a variable seems to be the only solution. Thanks!
by chinagreenelvis
03 May 2018, 20:02
Forum: Ask For Help
Topic: Using A_Args and contains Topic is solved
Replies: 4
Views: 204

Re: Using A_Args and contains Topic is solved

Whoops, it always returns if you only have the first extension:

Code: Select all

Extensions = avi
If A_Args[1] contains %Extensions%
{
  MsgBox, asdfasdf
}
But yes, the original gives the character error.
by chinagreenelvis
03 May 2018, 18:31
Forum: Ask For Help
Topic: Using A_Args and contains Topic is solved
Replies: 4
Views: 204

Using A_Args and contains Topic is solved

The following code returns true no matter what:

Code: Select all

Extensions = avi,divx,mp4,mpg,mpeg,wmv,mkv,mov,3gp,flv,m4v,webm,asf,m2ts
If A_Args[1] contains %Extensions%
{
  MsgBox, asdfasdf
}
by chinagreenelvis
01 May 2018, 08:56
Forum: Wish List
Topic: Window Spy
Replies: 2
Views: 446

Window Spy

The December 2017 update disabled the ability to lock update suspension. This makes window spy useless since I can't use it as a reference when actually writing code, which is what it's for. This is a double-whammy since Window Spy responds to ctrl and shift keys even when not the active window - so...
by chinagreenelvis
21 Apr 2018, 06:02
Forum: Ask For Help
Topic: Script slow in Windows 10 Topic is solved
Replies: 1
Views: 140

Re: Script slow in Windows 10 Topic is solved

Turns out the problem is FileAppend opening and closing the files each time they're written to. For some reason this process is much slower in Windows 10 than in 7. Solved the problem by using FileOpen() and WriteLine(). MakePlayLists(Directory) { SplitPath, Directory, TopFolder ;MsgBox, %Directory%...
by chinagreenelvis
20 Apr 2018, 23:06
Forum: Ask For Help
Topic: Script slow in Windows 10 Topic is solved
Replies: 1
Views: 140

Script slow in Windows 10 Topic is solved

I recently made the jump from Windows 7 to Windows 10 and kept my old installation on a new partition. Windows 10 is a clean install. The following script runs fine in Win7, but is ridiculously slow in Win10. In 7, the millisecond messagebox I added returns about 1500; in 10 it's around 35000. ; Win...
by chinagreenelvis
26 Mar 2018, 16:30
Forum: Ask For Help
Topic: Remapping Functionality Topic is solved
Replies: 10
Views: 344

Re: Remapping Functionality Topic is solved

What I wound up doing with the code is a little different than what I specified, which I did for simplicity. This is my final code, and it works well. What it does is it changes the way middle-click behaves in a Windows Explorer window. Middle-clicking and holding an item will drag and drop it and m...
by chinagreenelvis
21 Mar 2018, 02:01
Forum: Ask For Help
Topic: Remapping Functionality Topic is solved
Replies: 10
Views: 344

Re: Remapping Functionality Topic is solved

Thanks, Swag, that at least seems to solve part of the problem. I might be able to work with that.
by chinagreenelvis
20 Mar 2018, 16:19
Forum: Ask For Help
Topic: Remapping Functionality Topic is solved
Replies: 10
Views: 344

Re: Remapping Functionality Topic is solved

Unfortunately, that solution does not keep the left button down while the middle button is held.
by chinagreenelvis
20 Mar 2018, 15:26
Forum: Ask For Help
Topic: Remapping Functionality Topic is solved
Replies: 10
Views: 344

Remapping Functionality Topic is solved

How can I reproduce the effect of MButton::LButton (keeping the left button down while the middle button is held) within a multi line set such as MButton:: If (A_TimeSinceThisHotkey < 400) { [LButton] } Return so that the behavior is the same? Using Send {LButton Down} and Send {LButton Up} produces...
by chinagreenelvis
17 Jul 2017, 01:33
Forum: Ask For Help
Topic: Using "contains" inside parenthesis?
Replies: 2
Views: 168

Using "contains" inside parenthesis?

I generally format my code: If (condition1) || (condition2 && condition3) { do stuff } But this doesn't work when using contains. For example: If (condition1) || (condition2 && Var contains Var2, Var3) { don't bother to do stuff because you'll get an illegal character error, apparently AHK thinks th...
by chinagreenelvis
09 Mar 2017, 13:17
Forum: Ask For Help
Topic: INI Write Multiple Keys
Replies: 7
Views: 597

Re: INI Write Multiple Keys

GEV wrote:Try this:

Code: Select all

Loop
{
	IniRead, OutputVar, MyInifile.ini, Profile %A_Index%, Cover View
	If (OutputVar="ERROR")
		break
	If (OutputVar=0)
		IniWrite, 1, MyInifile.ini, Profile %A_Index%, Cover View
}
ExitApp
Aha! Thanks!
by chinagreenelvis
09 Mar 2017, 08:38
Forum: Ask For Help
Topic: INI Write Multiple Keys
Replies: 7
Views: 597

Re: INI Write Multiple Keys

I'm guessing there isn't a way to loop IniWrite through each section based on whether or not it contains a specific key...
by chinagreenelvis
09 Mar 2017, 08:20
Forum: Ask For Help
Topic: INI Write Multiple Keys
Replies: 7
Views: 597

Re: INI Write Multiple Keys

That should work, thanks!

What about a way to anticipate extra sections with the same key being added in the future?
by chinagreenelvis
09 Mar 2017, 07:50
Forum: Ask For Help
Topic: INI Write Multiple Keys
Replies: 7
Views: 597

INI Write Multiple Keys

I have an INI file that has 33 sections. In 32 sections, there is a key called "Cover View". It can be set to either 1 or 0. The 32 sections are called "Profile 1", "Profile 2", and so forth. Let's say that every "Cover View" key is currently set to 0; I would like to programmatically change them al...
by chinagreenelvis
10 Jan 2017, 15:09
Forum: Gaming
Topic: MAME Coin Control
Replies: 1
Views: 3026

Re: MAME Coin Control

Updated to allow toggle via F1 hotkey while MAME is active, simplified code using a function. ; MAME Coin Control ; by chinagreenelvis ; Version 0.03 #NoEnv #SingleInstance force #Persistent SetWorkingDir %A_ScriptDir% AppName=MAMECC IfNotExist, %AppName%.ini { IniWrite, 0, %AppName%.ini, Settings, ...
by chinagreenelvis
09 Jan 2017, 03:43
Forum: Ask For Help
Topic: ControlClick and Winamp
Replies: 0
Views: 185

ControlClick and Winamp

Running Winamp with the Bento Skin (also have tried ClassicPro) and trying to use a ControlClick to set focus to the playlist panel (not the tab). I can use ControlClick to set focus to the Media Library (SysListView321), but it doesn't seem to work for the playlist control (BaseWindow_RootWnd2). An...

Go to advanced search