4 posts in this topic
I'm not sure if I'm doing it right or there's a better way to restore windows from hidden in system tray, but if I remove the if statement then it's able to restore the program from system tray, but if I add the if statement then it doesn't restore it. Here's what I gotten so far and the reason why I use the if statement is because #32770 opens many other apps also.
WinSetState("[CLASS:#32770]", "", @SW_SHOW) If WinExists($title_Pass_Entrance) Then WinWaitActive(WinActivate($title_Pass_Entrance)) ControlSend($title_Pass_Entrance, "", "[CLASS:Edit; INSTANCE:1]", "TempPassword") ControlClick($title_Pass_Entrance, "", "[CLASS:Button; INSTANCE:2]", "left", 1) EndIf >>>> Window <<<< Title: Enter Safe Combination Class: #32770 Position: 728, 411 Size: 465, 218 Style: 0x94C800C4 ExStyle: 0x00010101 Handle: 0x0000000000050A7A >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle:
Feel free to post your windows 10 how to questions in here if you like.
How to secure Windows 10: The paranoid's guide (external - zdnet)
How to disable web search (within the windows search feature).
How to determine which exact process under Service Host dropdown in task manager, is using the displayed overall network resources? (not a windows 10 feature)
Something i worked out today for checking browser
Edge is not a traditional program (its an app to all intense and purpose) so not as simple to access
This how i got it working
Local $edge_test = FileExists(@WindowsDir & '\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdge.exe') If $edge_test = 1 Then Local $edge = RunWait('explorer.exe shell:AppsFolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge') EndIf The runwait will work for other apps as well if you change the appfolder location to the right app
There maybe other ways but this is best ive come up with so far
My problem is split in two, so I'll start with the first one:
What I'm having is my script with dynamically created GUIs with similar / identical names. I would like to have that undepending on how many windows I have open to only have one "window" down at the taskbar.
I guess all I need is the correct GUI style, but I can't find which one I need.
Which brings me to problem part 2 (which I also find to be the easy part):
Windows will open and close on random, so there's no set order in which they'll get closed. But I still need one "window" at the taskbar to work with as long as there's at least one window open.
In the action of one of these windows getting minimized/restored all of the windows will act simultaneously.
This will be solved with something similar:
case $GUI_EVENT_MINIMIZE for $1 = 1 to Ubound($ActiveWindows) step +1 WinSetState($ActiveWindows[$1], @SW_MINIMIZE) Next And vice versa for restore.
So .. Mainly prob #1 that I need some help with, and a thought about the "always one window at taskbar"-issue.
Just point me in the right direction and I'll hopefully solve it myself ^__^'
Thanks, and have a great weekend!
Here is two apps I've been working on to track the changes I make to scripts as I create them. One is for monitoring your script changes, the other is view/restore all the changes that have been made.
RevMonitor works by reciving shell change notifications from windows. For every .au3 file thats within a directory being monitored, 2 files will eventually be created ( as changes happen). One file is a dictionary file that holds all unique lines from the script. The second file is the revisons file that holds all revisons made to the script. A revison entry is a string of line numbers from the dictionary that make up the script. The entry also contains the Date and Time, plus weather it passed au3check at the time. (Date | Au3Check | Revision)
For an example take the following script:
#include <array.au3> Global $aArray1 Func _ShowArray(ByRef $aArray) If Not IsArray($aArray) Then Return SetError(1) _ArrayDisplay($aArray) If @error Then Return SetError(1) EndFunc Func _ShowArray2(ByRef $aArray) If Not IsArray($aArray) Then Return SetError(1) _ArrayDisplay($aArray) If @error Then Return SetError(2) EndFunc
The dictionary for the file would look like this:
#include <array.au3> Global $aArray1 Func _ShowArray(ByRef $aArray) If Not IsArray($aArray) Then Return SetError(1) _ArrayDisplay($aArray) If @error Then Return SetError(1) EndFunc Func _ShowArray2(ByRef $aArray) If @error Then Return SetError(2) A entry from the revison file would look like this:
11/29/2013 01:09:23 AM|0|0.1.2.1.184.108.40.206.220.127.116.11.18.104.22.168
RevRestore is used for restoring a file. Each dictionary/revison file that gets created for a script being monitored will always get created in a "backup" directory located in the same directory as the script (same way tidy makes backups). To view a revison file, you select the script (not the actual revison file). I wrote it this way to make the revison file easy to open from scite.
To add to SciTE, simply open the users options file (Tools->"Open User Options File") and add something similar to the following lines:
# 45 Open Revisions File command.45.$(au3)="C:\RevTracker\RevRestore.exe" "$(FilePath)" command.name.45.$(au3)=Restore Revision command.shortcut.45.$(au3)=Ctrl+Shift+R ScreenShots:
Credits - Thank you to all:
Melba23 - Toast, GuiFrame
Ward - QuickLZ
Yashied - Restart
Note: The .html link is just to help me keep track of downloads. Open the .html file and a download dialog will display.