Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

made autofunction information pane more informative

  • Loading branch information...
commit 7c8ee58b486f45fc63242a9a71a70de59b313660 1 parent 2984c35
@headius authored headius committed
View
7 AutoEntry.cpp
@@ -110,8 +110,9 @@ BOOL AutoEntryDlg::OnInitDialog(WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_ADDSTRING, 0, (LONG)"Maximize");
SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
- SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Stays on Top");
- SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Doesn't Stay on Top");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Topmost");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Normal");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Bottom");
SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_SETCURSEL, 0, 0);
SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_ADDSTRING, 0, (LONG)"Visible");
@@ -160,6 +161,8 @@ BOOL AutoEntryDlg::OnInitDialog(WPARAM wParam, LPARAM lParam)
AutoFunction *af;
char astring[STRING_BUFFER_SIZE];
+ SetWindowText(m_hWnd, "Edit Auto Entry");
+
SendDlgItemMessage(m_hWndParent, IDC_AUTOENTRIES, LB_GETTEXT, m_Function, (LPARAM)astring);
SetDlgItemText(m_hWnd, IDC_ENTRYNAME, astring);
EnableWindow(GetDlgItem(m_hWnd, IDC_ENTRYNAME), FALSE);
View
7 AutoFunction.cpp
@@ -106,12 +106,15 @@ void AutoFunction::execute(HackItDlg *dlg, AutoFunction *af, HWND window) {
}
switch (af->getTopmostAction()) {
- case AUTO_ACTION_STAYONTOP:
+ case AUTO_ACTION_TOPMOST:
WindowFunctions::TopWindow(window);
break;
- case AUTO_ACTION_NOSTAYONTOP:
+ case AUTO_ACTION_NOTOPMOST:
WindowFunctions::TopWindow(window);
break;
+ case AUTO_ACTION_BOTTOM:
+ WindowFunctions::BottomWindow(window);
+ break;
}
switch (af->getWindowAction()) {
View
4 HackIt.rc
@@ -99,7 +99,7 @@ STYLE DS_SYSMODAL | DS_MODALFRAME | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUP |
WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Automatic Functions"
-FONT 8, "MS Sans Serif"
+FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
LISTBOX IDC_AUTOENTRIES,5,15,115,139,LBS_SORT |
LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
@@ -228,7 +228,7 @@ END
IDD_ILLEGALWINDOWENTRY DIALOG DISCARDABLE 0, 0, 176, 190
STYLE DS_SYSMODAL | DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_CAPTION |
WS_SYSMENU
-CAPTION "Illegal Window Entry"
+CAPTION "Add Illegal Window Entry"
FONT 8, "MS Sans Serif"
BEGIN
EDITTEXT IDC_ILLEGALNAME,7,17,162,12,ES_AUTOHSCROLL
View
1  IllegalWindowEntry.cpp
@@ -137,6 +137,7 @@ void IllegalWindowEntryDlg::OnInitDialog()
SetDlgItemText(m_hWnd, IDC_ILLEGALFILENAMECOMBO, m_IllegalFilename);
if (strlen(m_IllegalName) != 0) {
+ SetWindowText(m_hWnd, "Edit Illegal Window Entry");
EnableWindow(GetDlgItem(m_hWnd, IDC_ILLEGALNAME), FALSE);
}
View
174 SettingsDlg.cpp
@@ -419,60 +419,158 @@ void SettingsDlg::SelchangeFunctions()
SendDlgItemMessage(m_hWndFunctionDlg, IDC_AUTOENTRIES, LB_GETTEXT, index, (UINT)(LPCTSTR)astring);
af = (AutoFunction*)SendDlgItemMessage(m_hWndFunctionDlg, IDC_AUTOENTRIES, LB_GETITEMDATA, index, 0);
- sprintf(infobuf, "Class: \t\t\t%s\r\n", af->getWinClass().c_str());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Title: \t\t\t%s\r\n", af->getTitle().c_str());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "File Name: \t\t%s\r\n", af->getFilename().c_str());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Case Sensitive: \t\t%d\r\n", af->getCaseSensitive());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Window Action: \t\t%d\r\n", af->getWindowAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Topmost Action: \t\t%d\r\n", af->getTopmostAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Visiblity Action: \t\t%d\r\n", af->getVisibilityAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ if (af->getWinClass().length() > 0) {
+ sprintf(infobuf, "Class: \t\t%s\r\n", af->getWinClass().c_str());
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getTitle().length() > 0) {
+ sprintf(infobuf, "Title: \t\t%s\r\n", af->getTitle().c_str());
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getFilename().length() > 0) {
+ sprintf(infobuf, "File Name: \t%s\r\n", af->getFilename().c_str());
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getCaseSensitive()) {
+ sprintf(infobuf, "Case Sensitive: \tTrue\r\n");
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getWindowAction()) {
+ switch (af->getWindowAction()) {
+ case AUTO_ACTION_RESTORE:
+ sprintf(infobuf, "Window Action: \tRestore\r\n");
+ break;
+ case AUTO_ACTION_MINIMIZE:
+ sprintf(infobuf, "Window Action: \tMinimize\r\n");
+ break;
+ case AUTO_ACTION_MAXIMIZE:
+ sprintf(infobuf, "Window Action: \tMaximize\r\n");
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getTopmostAction()) {
+ switch (af->getTopmostAction()) {
+ case AUTO_ACTION_NOTOPMOST:
+ sprintf(infobuf, "Topmost Action: \tStandard\r\n");
+ break;
+ case AUTO_ACTION_TOPMOST:
+ sprintf(infobuf, "Topmost Action: \tTopmost\r\n");
+ break;
+ case AUTO_ACTION_BOTTOM:
+ sprintf(infobuf, "Topmost Action: \tBottom\r\n");
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getVisibilityAction()) {
+ switch (af->getVisibilityAction()) {
+ case AUTO_ACTION_VISIBLE:
+ sprintf(infobuf, "Visibility Action: \tVisible\r\n");
+ break;
+ case AUTO_ACTION_HIDDEN:
+ sprintf(infobuf, "Visibility Action: \tHidden\r\n");
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
if (MySetLayeredWindowAttributes) {
- sprintf(infobuf, "Transparency: \t\t%d\r\n", af->getTransparency());
+ switch (af->getTransparency()) {
+ case 0:
+ sprintf(infobuf, "Transparency: \tNone\r\n");
+ break;
+ default:
+ sprintf(infobuf, "Transparency: \t%d0%%\r\n", af->getTransparency());
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getPriorityAction()) {
+ switch (af->getPriorityAction()) {
+ case AUTO_ACTION_IDLE:
+ sprintf(infobuf, "Priority Action: \tIdle\r\n");
+ break;
+ case AUTO_ACTION_NORMAL:
+ sprintf(infobuf, "Priority Action: \tNormal\r\n");
+ break;
+ case AUTO_ACTION_HIGH:
+ sprintf(infobuf, "Priority Action: \tHigh\r\n");
+ break;
+ case AUTO_ACTION_REALTIME:
+ sprintf(infobuf, "Priority Action: \tReal-Time\r\n");
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getDestructionAction()) {
+ switch (af->getDestructionAction()) {
+ case AUTO_ACTION_CLOSEWINDOW:
+ sprintf(infobuf, "Destruction Action: \tClose Window\r\n");
+ break;
+ case AUTO_ACTION_ENDTASK:
+ sprintf(infobuf, "Destruction Action: \tEnd Task\r\n");
+ break;
+ }
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
- sprintf(infobuf, "Priority Action: \t\t%d\r\n", af->getPriorityAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Destruction Action: \t\t%d\r\n", af->getDestructionAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Resize: \t\t\t%d\r\n", af->getResize());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+
if (af->getResize()) {
- sprintf(infobuf, "\tWidth: \t\t%d\r\n", af->getResizeW());
+ sprintf(infobuf, "Resize Width: \t%d\r\n", af->getResizeW());
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "\tHeight: \t\t%d\r\n", af->getResizeH());
+ sprintf(infobuf, "Resize Height: \t%d\r\n", af->getResizeH());
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
- sprintf(infobuf, "Move: \t\t\t%d\r\n", af->getMove());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+
if (af->getMove()) {
- sprintf(infobuf, "\tX: \t\t%d\r\n", af->getMoveX());
+ sprintf(infobuf, "Move X: \t\t%d\r\n", af->getMoveX());
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "\tY: \t\t%d\r\n", af->getMoveY());
+ sprintf(infobuf, "Move Y: \t\t%d\r\n", af->getMoveY());
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
- sprintf(infobuf, "Special Action: \t\t%d\r\n", af->getSpecialAction());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+
if (af->getSpecialAction()) {
- sprintf(infobuf, "\tData: \t\t%s\r\n", af->getSpecialData().c_str());
+ switch (af->getSpecialAction()) {
+ case AUTO_ACTION_PRESSBUTTON:
+ sprintf(infobuf, "Special Action: \tPress Button\r\n");
+ break;
+ }
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ sprintf(infobuf, "Special Data: \t%s\r\n", af->getSpecialData().c_str());
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getAlternateTarget()) {
+ switch (af->getAlternateTarget()) {
+ case AUTO_TARGET_CHILD:
+ sprintf(infobuf, "Alternate Target: \tChild\r\n");
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ sprintf(infobuf, "Child: \t\t%s\r\n", af->getAlternateData().c_str());
+ break;
+ case AUTO_TARGET_PARENT:
+ sprintf(infobuf, "Alternate Target: \tParent\r\n");
+ break;
+ }
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
- sprintf(infobuf, "Alternate Target: \t\t%d\r\n", af->getAlternateTarget());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- if (af->getAlternateTarget() == AUTO_TARGET_CHILD) {
- sprintf(infobuf, "\tChild: \t\t%s\r\n", af->getAlternateData().c_str());
+
+ if (af->getTrayIcon()) {
+ sprintf(infobuf, "Tray Icon: \tTrue\r\n");
+ strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
+ }
+
+ if (af->getTopOnly()) {
+ sprintf(infobuf, "Top-level Only: \tTrue\r\n");
strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
- sprintf(infobuf, "Tray Icon: \t\t%d\r\n", af->getTrayIcon());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
- sprintf(infobuf, "Top-level Only: \t\t%d\r\n", af->getTopOnly());
- strncat(info, infobuf, STRING_BUFFER_SIZE_LARGE);
}
SetDlgItemText(m_hWndFunctionDlg, IDC_INFOEDIT, info);
View
5 WindowFunctions.cpp
@@ -28,6 +28,11 @@ void WindowFunctions::TopWindow(HWND window)
::SetWindowPos(window, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
}
+void WindowFunctions::BottomWindow(HWND window)
+{
+ ::SetWindowPos(window, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+}
+
void WindowFunctions::UnTopWindow(HWND window)
{
::SetWindowPos(window, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
View
1  WindowFunctions.h
@@ -18,6 +18,7 @@ class WindowFunctions
static void WindowSetFont(HWND Window);
static void UnTopWindow(HWND window);
static void TopWindow(HWND window);
+ static void BottomWindow(HWND window);
static void WindowChangeText(HWND Window);
static void WindowEnable(HWND Window);
static void WindowDisable(HWND Window);
View
5 defines.h
@@ -67,8 +67,9 @@
#define AUTO_ACTION_MAXIMIZE 3
// Topmost AUTO_ACTIONs
-#define AUTO_ACTION_STAYONTOP 1
-#define AUTO_ACTION_NOSTAYONTOP 2
+#define AUTO_ACTION_TOPMOST 1
+#define AUTO_ACTION_NOTOPMOST 2
+#define AUTO_ACTION_BOTTOM 3
// Visiblity AUTO_ACTIONs
#define AUTO_ACTION_VISIBLE 1
View
12 help/automatic_functions.html
@@ -116,16 +116,14 @@
</P>
<P CLASS="MsoNormal"><B><A NAME="TopmostActions">Topmost Actions</A>:</B>
These actions allow you to set whether a window is Topmost, Normal,or
- Bottommost. When windows are drawn on the screen, Bottommost windows
- always appear beneath Normal windows, which in turn always appear beneath
+ Bottom. When windows are drawn on the screen, Normal windows always appear beneath
Topmost windows. Looked at another way, Topmost windows are always drawn
- on top of Normal windows, which are always drawn on top of Bottommost
- windows. This ordering occurs whether a given window is active or not.
- Most windows on the system are in the Normal state. Within each group
- (Bottom windows, Normal windows, Top windows), the standard placement
+ on top of Normal windows. This ordering occurs whether a given window is active or not.
+ Most windows on the system are in the Normal state. Within each group (Normal windows, Top windows), the standard placement
occurs (currently active window is drawn on the top of the other windows
in the group, the second-most-recently-active window is drawn just below
- it, and so on). By selecting an action from this list, you can chang the
+ it, and so on). Selecting the Bottom action sends a matched window to the
+ bottom of the desktop, behind all other visible windows. By selecting an action from this list, you can change the
topmost status of a matched window.<o:p>
</o:p>
</P>
Please sign in to comment.
Something went wrong with that request. Please try again.