This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 Internal Functions (actions)
 Functions Exposed to Lua scripts
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Rob

USA
2615 Posts

Posted - 12/15/2011 :  10:32:35  Show Profile  Visit Rob's Homepage
NOTE: I notice I'm not keeping this post up-to-date since it's redundant with the change log and help/action help files. Leaving this post here, but check the help file and change log for updates to internal actions.


acGetMouseLocationX()
   Returns: integer
   Comments: Returns the X (left) coordinate of the current mouse location

acGetMouseLocationY()
   Returns: integer
   Comments: Returns the Y (top) coordinate of the current mouse location

acMouseMove(x, y)
   Parameters:
     x: The X (left) coordinate to move the mouse cursor to
     y: The Y (top) coordinate to move the mouse cursor to
   Returns: integer (always 1)
   Comments: Moves the mouse cursor to the specified coordinates

acMouseClick(x, y, button, down, up)
   Parameters:
     x: The X (left) coordinate of where the click should occur
     y: The Y (top) coordinate of where the click should occur
     button: The mouse button which should be sent
         0: Secondary button (right if mouse buttons aren't swapped)
         1: Middle button
         2: Primary button (left if mouse buttons aren't swapped)
         3: X1 button
         4: X2 button
     down: (0 for False, 1 for True) If the MOUSE_BUTTON_DOWN message should be sent
     up: (0 for False, 1 for True) If the MOUSE_BUTTON_UP message should be sent
   Returns: integer (always 1)
   Comments: Send a mouse down and/or up event at the specified coordinates

acSendMessage(hwndTarget, MessageID, wParam, lParam)
   Parameters:
     hwndTarget: The destination handle of the window where the message is to be sent
     MessageID: (integer) The message ID to be sent.
     wParam: (integer) The wParam to be sent
     lParam: (integer) The lParam to be sent
   Returns: integer (always 1)
   Comments: This is a very simple form, not allowing for complex data structures in wParam and lParam.
     I intend to try and support any type of parameter in the future.

acPostMessage(hwndTarget, MessageID, wParam, lParam)
   Parameters:
     hwndTarget: The destination handle of the window where the message is to be sent
     MessageID: (integer) The message ID to be sent.
     wParam: (integer) The wParam to be sent
     lParam: (integer) The lParam to be sent
   Returns: integer (always 1)
   Comments: This is a very simple form, not allowing for complex data structures in wParam and lParam.
     I intend to try and support any type of parameter in the future.

acReloadConfig()
   Returns: integer (always 1)
   Comments: Instructs StrokesPlus to reload the data from the configuration file (StrokesPlus.xml)

acExit()
   Returns: integer (always 1)
   Comments: Exits StrokesPlus

acGetWindowLeft(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer
   Comments: Gets the X (left) coordinate of the specified window

acGetWindowTop(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer
   Comments: Gets the Y (top) coordinate of the specified window

acGetWindowRight(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer
   Comments: Gets the CX (right) of the specified window

acGetWindowBottom(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer
   Comments: Gets the CY (bottom) of the specified window

acPreviousApplication()
   Returns: integer (always 1)
   Comments: Switches to the previous window, like pressing ALT+TAB

acNextApplication()
   Returns: integer (always 1)
   Comments: Switches to the next application in the window list, like holding ALT and pressing tab (cycles through the open programs)

acDisable()
   Returns: integer (always 1)
   Comments: Disables StrokesPlus. Calling again will enable S+.

acDisableNext()
   Returns: integer (always 1)
   Comments: Disables the next gesture from being captured

acActivateWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window to be activated; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be activated
     y: The Y (top) coordinate of the window to be activated
     method: The type of method used to activate the window; 0 for standard, 1 for thread input, 2 for temporary ALT keypress. Use 0 (default) first, only use the others if 0 isn't working for you.
   Returns: integer (always 1)
   Comments: Activates the window at the specified coordinates

acCloseApplication(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window to be closed; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be closed
     y: The Y (top) coordinate of the window to be closed
   Returns: integer (always 1)
   Comments: Closes the window at the specified coordinates

acMaximizeWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window to be maximized; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be maximized
     y: The Y (top) coordinate of the window to be maximized
   Returns: integer (always 1)
   Comments: Maximizes the window at the specified coordinates

acMaximizeOrRestoreWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window to be restored or maximized; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be restored or maximized
     y: The Y (top) coordinate of the window to be restored or maximized
   Returns: integer (always 1)
   Comments: Restores or maximizes the window, depending on its state at the specified coordinates

acMinimizeWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window to be minimized; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be minimized
     y: The Y (top) coordinate of the window to be minimized
   Returns: integer (always 1)
   Comments: Minimizes the window at the specified coordinates

acDelay(duration)
   Parameters:
     duration: (ms) Number of millisecond to pause
   Returns: integer (always 1)
   Comments: Pauses the Lua script for the specified duration (Sleep(n))

acMoveWindow(hwndTarget, x, y, left, top)
   Parameters:
     hwndTarget: The handle to the window to be moved; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be moved
     y: The Y (top) coordinate of the window to be moved
     left: The new X (left) coordinate of the window's location
     top: The new Y (top) coordinate of the window's location
   Returns: integer (always 1)
   Comments: Moves the window using the specified coordinates

acSendKeys(keystring)
   Parameters:
     keystring: The string of send keys commands (covered here: http://www.strokesplus.com/forum/topic.asp?TOPIC_ID=38)
   Returns: integer (always 1)
   Comments: Sends keystrokes to the active window.

acRunProgram(fullpath, parameters, seconds, style)
   Parameters:
     fullpath: Full path to EXE; requires escaped backslashes (C:\windows\notepad.exe needs to be written like C:\\windows\\notepad.exe).
     parameters: The command line parameters to pass to the program
     seconds: The seconds to wait for the program to exit (to get an exit code); if the duration has passed and the program is still running, 0 is returned.
     style: The window style for the program, using one of the nCmdShow value described here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633548.aspx
   Returns: integer - 0 or return code from program (if it exits before the seconds duration is reached)
   Comments:

acSetVolume(value, increment)
   Parameters:
     value: (integer 0-100) Value to set the volume to
     increment: (0 for False, 1 for True) - true tells SP to use the Value parameter as an adjustment to the current volme, false sets the volume to the Value explicitly
   Returns: integer (always 0)
   Comments: Sets the master volume level

acGetVolume()
   Returns: integer - Current volume level, 0-100
   Comments: Returns the current volume of the master channel

acToggleMute()
   Returns: integer (always 0)
   Comments: Toggles the mute on the master channel

acGetMute()
   Returns: integer - 1 for muted, 0 for not muted
   Comments: Returns the state of the mute on the master channel

acSetMute(value)
   Parameters:
     value: 1 to mute, 0 to unmute
   Returns: integer (always 0)
   Comments: Sets the mute state based on the value passed in

acFindWindow(classname, title)
   Parameters:
     classname: The class name of the window to be located
     title: The title of the window to be located
   Returns: integer - Handle to the window, 0 if not found
   Comments: Finds a window by class and/or title, exact match. Pass nil in place of either parameter to exclude it from the search. For example, acFindWindow("Winamp v1.x",nil) will find the Winamp class and ignore qualifying on title.

acFindWindowByTitleRegex(titlepattern)
   Parameters:
     titlepattern: The regular expression to use when searching for a window title
   Returns: integer - Handle to the window, 0 if not found
   Comments: Finds the first window by matching the title to the regular expression passed in

acGetWindowTitle(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: string - Window title
   Comments: Returns the title of the window specified

acMessageBox(message, title, style)
   Parameters:
     message: The main message to be displayed
     title: Title of the message box window
     style: The integer (based on Win32 specs) which represents the style of the message box, which includes the icon, buttons, and default button. nil for no style (Ok button only)
   Returns: integer - The value returned by the message box, if a style was specified, which button was clicked will be returned (like a Yes/No box, the return value indicates the button that was clicked)
   Comments: Displays a standard Windows message box. May pass in style to customize the icon and buttons.

acSetWindowSize(hwndTarget, x, y, width, height)
   Parameters:
     hwndTarget: The handle to the window to be moved/sized; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window to be moved/sized
     y: The Y (top) coordinate of the window to be moved/sized
     width: The new width of the window
     height: The new height of the window
   Returns: integer (always 1)
   Comments: Moves and sizes the window using the specified coordinates and width/height

acSendWindowToBottom(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Sends the specified window to the bottom of the window stack (imagine turning laying your screen flat and looking down at it)

acActivateWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Brings the specified window to the foreground (top of the window stack)

acRestoreWindow(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Restores the specified window

acGetOwnerWindowByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer
   Comments: Returns the handle of the owner (ancestor) window to which the target window belongs

acGetParentWindowByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer
   Comments: Returns the handle of the parent window to which the target window belongs

acGetWindowByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer
   Comments: Returns the handle of the window at the specified coordinates

acSetProcessPriority(hwndTarget, x, y, priority)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
     priority: (integer) The value of the new priority (based on the dwPriorityClass value here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686219.aspx)
   Returns: integer (always 1)
   Comments: Sets the process priority of the window

acTerminateProcess(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Kills the main process of the window specified. This does not send a friendly close message which prompts to save files, etc.

acToggleTopmost(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Toggles the TOPMOST flag of the window on or off

acSetTopmost(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Sets the TOPMOST flag of the window to ON

acClearTopmost(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer (always 1)
   Comments: Clears the TOPMOST flag of the window

acGetSystemMetrics(value)
   Parameters:
     value: The ID (number) (based on Win32 specs) which to retreive
   Returns: integer - The value returned by Windows
   Comments: This directly calls GetsystemMetrics, which can be useful in finding out various metrics of the Windows configuration. See: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385.aspx

acPauseResumeThreadList(hwndTarget, x, y, resume)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
     resume: (0 for False, 1 for True) true to resume threads, false to suspenf
   Returns: integer (always 1)
   Comments: Suspends or resumes all threads of a window. This is VERY dangerous and NOT recommended, by me or Microsoft, in fact.

acSetWindowColorKey(hwndTarget, x, y, remove, red, green, blue)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
     remove: (0 for False, 1 for True) true to remove the color key
     red: The red value of the color to make the color key
     green: The green value of the color to make the color key
     blue: The blue value of the color to make the color key
   Returns: integer (always 1)
   Comments: Sets the color key for a window, which makes all parts of a window which match the color (R,G,B) transparent. Can have odd results depending on the window!

acSetWindowTransparency(hwndTarget, x, y, opacity)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
     opacity: The value to set the level of opacity to, 0-255 (255 is opaque)
   Returns: integer (always 1)
   Comments: Sets the level of transparency of a window, 0 being invisible, 255 being solid

acSetWindowTransparencyAndColorKey(hwndTarget, x, y, opacity, red, green, blue)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
     opacity: The value to set the level of opacity to, 0-255 (255 is opaque)
     red: The red value of the color to make the color key
     green: The green value of the color to make the color key
     blue: The blue value of the color to make the color key
   Returns: integer (always 1)
   Comments: Sets the transparency and color key for a window

acGetWindowTransparency(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer 0-255
   Comments: Gets the level of transparency of a window, 0 being invisible, 255 being solid

acGetWindowColorKeyR(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer 0-255
   Comments: Gets the red (R) part of the color to which the window's color key is

acGetWindowColorKeyG(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer 0-255
   Comments: Gets the green (G) part of the color to which the window's color key is

acGetWindowColorKeyB(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the window; "nil" will use the x and y to locate the window
     x: The X (left) coordinate of the window
     y: The Y (top) coordinate of the window
   Returns: integer 0-255
   Comments: Gets the blue (B) part of the color to which the window's color key is

acGetPixelRByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the point
     y: The Y (top) coordinate of the point
   Returns: integer 0-255
   Comments: Gets the red (R) part of the color at the specified point

acGetPixelGByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the point
     y: The Y (top) coordinate of the point
   Returns: integer 0-255
   Comments: Gets the green (G) part of the color at the specified point

acGetPixelBByPoint(x, y)
   Parameters:
     x: The X (left) coordinate of the point
     y: The Y (top) coordinate of the point
   Returns: integer 0-255
   Comments: Gets the blue (B) part of the color at the specified point

acShowIgnoreList()
   Returns: integer (always 1)
   Comments: Shows the Ignore List window

acShowPrefs()
   Returns: integer (always 1)
   Comments: Shows the Preferences window

acShowActions()
   Returns: integer (always 1)
   Comments: Shows the Actions window

Rob

USA
2615 Posts

Posted - 12/23/2011 :  03:25:38  Show Profile  Visit Rob's Homepage
Added:

acGetForegroundWindow()
  Returns: integer
  Comments: Returns the handle of the foreground (top) window, the one which is currently active

acGetDesktopWindow()
  Returns: integer
  Comments: Returns the handle of the Desktop window, this window which represents the Windows Desktop
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/24/2011 :  19:16:45  Show Profile  Visit Rob's Homepage
Added:

acGetClipboardText()
   Returns: string
   Comments: Returns the current text of the clipboard

acSetClipboardText(value)
   Parameters:
     value: The text to save to the clipboard
   Returns: integer (always 1)
   Comments: Sets the clipboard text to "value"
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/25/2011 :  05:30:21  Show Profile  Visit Rob's Homepage
acRunProgram(fullpath, parameters, seconds)

Updated to:

acRunProgram(fullpath, parameters, seconds, style)

IMPORTANT! Having a missing style parameter defaults to 0, which means run the program hidden. Previous acRunProgram actions in the default config file did not specify a style parameter. Simply ad ",1" before the closing paren to show the window as normal.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/25/2011 :  05:34:24  Show Profile  Visit Rob's Homepage
Also, acRunProgram now returns 0 or the program's exit code, if program exits before the seconds parameter is met, otherwise 0 is default.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/27/2011 :  15:38:08  Show Profile  Visit Rob's Homepage
Added:

acSendControlDown()
   Returns: integer (always 1)
   Comments: Sends the Control key down event
acSendControlUp()
   Returns: integer (always 1)
   Comments: Sends the Control key up event

acSendAltDown()
   Returns: integer (always 1)
   Comments: Sends the Alt key down event
acSendAltUp()
   Returns: integer (always 1)
   Comments: Sends the Alt key up event

acSendShiftDown()
   Returns: integer (always 1)
   Comments: Sends the Shift key down event
acSendShiftUp()
   Returns: integer (always 1)
   Comments: Sends the Shift key up event

acSendWinDown()
   Returns: integer (always 1)
   Comments: Sends the Win key down event
acSendWinUp()
   Returns: integer (always 1)
   Comments: Sends the Win key up event
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/28/2011 :  16:48:48  Show Profile  Visit Rob's Homepage
Added:

acCenterWindowToScreen(hwndTarget, x, y, useworkarea)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
     useworkarea: (0 for False, 1 for True) whether to use the work area of the screen or not (work area excludes the space used by the taskbar)
   Returns: integer (always 1)
   Comments: Centers on the window on the screen

acClipWindowToScreen(hwndTarget, x, y, useworkarea)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
     useworkarea: (0 for False, 1 for True) whether to use the work area of the screen or not (work area excludes the space used by the taskbar)
   Returns: integer (always 1)
   Comments: Re-positions the window on the screen, does the best to ensure the window is not outside the screen boundaries, but does not resize the window
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/29/2011 :  11:05:44  Show Profile  Visit Rob's Homepage
Added in 1.0.12:

acFitWindowToScreen(hwndTarget, x, y, useworkarea)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
     useworkarea: (0 for False, 1 for True) whether to use the work area of the screen or not (work area excludes the space used by the taskbar)
   Returns: integer (always 1)
   Comments: Fits the window to the screen it's mostly occupying, so it takes up the whole screen.

acMaximizeToAllScreens(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer (always 1)
   Comments: Stretches the window so it takes up the whole desktop, across all screens. Generally, this isn't very practical, but it's there for what it's worth.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/30/2011 :  10:12:31  Show Profile  Visit Rob's Homepage
Added in 1.0.15:

acGetMonitorFromPoint(x, y)
   Parameters:
     x: the x coordinate of the point used to locate the monitor
     y: See above
   Returns: integer
   Comments: Returns the handle to the monitor where the x,y is located

acGetMonitorName(monitorhandle)
   Parameters:
     monitorhandle: Handle to the monitor
   Returns: string
   Comments: Returns the name of the monitor

acSendWindowToPreviousMonitor(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer (always 1)
   Comments: Sends the window to the previous monitor (positions based on LEFT and TOP, does not resize)

acSendWindowToNextMonitor(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: integer (always 1)
   Comments: Sends the window to the next monitor (positions based on LEFT and TOP, does not resize)

acSendWindowToMonitorByHandle(monitorhandle)
   Parameters:
     monitorhandle: The handle to the desired monitor
   Returns: integer (always 1)
   Comments: Sends the window to the specified monitor (positions based on LEFT and TOP, does not resize)

acSendWindowToMonitorByName(monitorname)
   Parameters:
     monitorname: The name of the desired monitor (must be an escaped string! \\ for \, e.g. "\\.\DISPLAY1" would be written in Lua script as "\\\\.\\DISPLAY1")
   Returns: integer (always 1)
   Comments: Sends the window to the specified monitor (positions based on LEFT and TOP, does not resize)
Go to Top of Page

Rob

USA
2615 Posts

Posted - 12/30/2011 :  15:31:33  Show Profile  Visit Rob's Homepage
Added in 1.0.16:

acGetMonitorFromName(monitorname)
   Parameters:
     monitorname: The name of the monitor (value must be in escaped form, "\\" for "\", e.g. "\\.\DISPLAY1" would be written in Lua script as "\\\\.\\DISPLAY1")
   Returns: integer - monitor handle
   Comments: Gets handle to the specified monitor

acGetMonitorLeft(monitorhandle, useworkarea)
   Parameters:
     monitorhandle: The handle to the monitor
     useworkarea: Whether to consider only the work area, not full monitor (excludes taskbar, docked windows)
   Returns: integer
   Comments: Gets the X (left) coordinate of the specified monitor

acGetMonitorTop(monitorhandle, useworkarea)
   Parameters:
     monitorhandle: The handle to the monitor
     useworkarea: Whether to consider only the work area, not full monitor (excludes taskbar, docked windows)
   Returns: integer
   Comments: Gets the Y (top) coordinate of the specified monitor

acGetMonitorRight(monitorhandle, useworkarea)
   Parameters:
     monitorhandle: The handle to the monitor
     useworkarea: Whether to consider only the work area, not full monitor (excludes taskbar, docked windows)
   Returns: integer
   Comments: Gets the CX (right) coordinate of the specified monitor

acGetMonitorBottom(monitorhandle, useworkarea)
   Parameters:
     monitorhandle: The handle to the monitor
     useworkarea: Whether to consider only the work area, not full monitor (excludes taskbar, docked windows)
   Returns: integer
   Comments: Gets the CY (bottom) coordinate of the specified monitor
Go to Top of Page

Rob

USA
2615 Posts

Posted - 01/04/2012 :  11:50:47  Show Profile  Visit Rob's Homepage
Added in 1.1.1:

acPlaySound(filename)
   Parameters:
     filename: The full path (remembering about escaping Lua strings) to the WAV filewindows)
   Returns: integer (always 1)
   Comments: Plays a sound.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 01/09/2012 :  12:43:36  Show Profile  Visit Rob's Homepage
acDisplayText(message, font, size, red, green, blue, duration, x, y)
   Parameters:
     message: The text to display
     font: The name of the font to use
     size: The size of the text
     red: The red portion of the color of the text color (RGB)
     green: The green portion of the color of the text color (RGB)
     blue: The blue portion of the color of the text color (RGB)
     duration: How long to display the text, in milliseconds
     x: The X (left) coordinate to place the text
     y: The Y (top) coordinate to place the text
   Returns: integer, 1 for success, 0 if there's already a text message still being displayed.
   Comments: Displays the specified text on the screen using the location and styles specified.


Go to Top of Page

Rob

USA
2615 Posts

Posted - 01/10/2012 :  05:57:17  Show Profile  Visit Rob's Homepage
Added in 1.2.2:

acGetClassName(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: string
   Comments: Gets the class name of the window or control. Note that unlike other actions where X and Y return the OWNING window, this control returns the window at the point specified, so if the point of over a button, the button's class name will be returned. You can call acGetOwnerWindowByPoint() or acGetParentWindowByPoint() if you'd like to walk up the container hierarchy.


acGetExecutableName(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: string
   Comments: Gets the name of the EXE which owns the window
Go to Top of Page

Rob

USA
2615 Posts

Posted - 01/13/2012 :  07:40:34  Show Profile  Visit Rob's Homepage
Added in 1.2.4:

acLockWindows()
   Returns: integer (always 1)
   Comments: Locks Windows, equivalent of pressing WIN+L.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 02/07/2012 :  12:24:03  Show Profile  Visit Rob's Homepage
Added in 1.4.7:

acToggleTrayIcon(state)
Parameters: state: -1 = hide, 0 = toggle, 1 = show
   Returns: integer (always 1)
   Comments: Toggles whether the StrokesPlus tray icon is hidden or visible. Can also be accomplished by pressing CTRL+SHIFT+WIN+S
Go to Top of Page

Rob

USA
2615 Posts

Posted - 02/09/2012 :  12:04:31  Show Profile  Visit Rob's Homepage
Added in 1.5.2:


acShellExecute(verb, file, parameters, directory, style)
   Parameters:
     verb: edit, explore, find, open, print. Search for ShellExecute MSDN on the Internet for more details.
     file: The file or folder to open. Will use the current directory unless the directory parameter is specified.
     parameters: (optional) The command line parameters to pass to the program
     directory: (optional) Specifies the working directory.
     style: The window style for the program, using one of the nCmdShow value described here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633548.aspx
   Returns: integer (always 1)
   Comments: Executes the specified verb on the file or object specified. For example, specify a MS Word document with "open" and it will open it in MS Word. Or an EXE can be opened, similar to acRunProgram().
Go to Top of Page

Rob

USA
2615 Posts

Posted - 02/29/2012 :  11:41:15  Show Profile  Visit Rob's Homepage
Added in 1.7.3: (updated in 1.7.4)


acTileWindows(mode, area, method)
   Parameters:
     mode: 1 to tile vertically, 2 to tile horizontally.
     area: 0 to tile only on the screen where the window under the gesture start resides, 1 to tile
     method: 0 to have StrokesPlus handle the tiling, 1 to have Window handle the tiling
   Returns: integer (always 1)
   Comments: Tiles all open windows vertically or horizontally across either the screen or all screens. Note that some windows may not position properly due to non-standard window creation. I will continue to refine thiese actions accordingly, but try changing the method as well to see what works best for you.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 03/13/2012 :  01:00:51  Show Profile  Visit Rob's Homepage
Added in 1.8.0:

acShowAbout()
   Returns: integer (always 1)
   Comments: Displays the About window
Go to Top of Page

Rob

USA
2615 Posts

Posted - 04/20/2012 :  11:20:33  Show Profile  Visit Rob's Homepage
Added in 1.8.4:


acGetProcessIDFromPattern(filepattern)
   Parameters:
     filepattern: The name or regular expression pattern to search for.
   Returns: integer - 1 if a match is found, 0 if not
   Comments: Determines if there is a process running which matches the file pattern. File pattern can be the exact name of the executable, or a regular expression for wildcard searches.


acGetWindowFromProcessID(processID)
   Parameters:
     processID: The process ID to use when searching for a top-level window.
   Returns: integer - handle to the first top-level window of the process, or nil if no match was found.
   Comments: Searches for a top-level window that belongs to the process ID passed. If a match is found, the handle is returned, otherwise nil is returned.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 06/16/2012 :  15:55:52  Show Profile  Visit Rob's Homepage
Added in 2.0.1:

acGetControlID(hwndTarget, x, y)
   Parameters:
     hwndTarget: The handle to the desired window (if "nil", x and y will be used to get the window at those coordinates)
     x: If no hwndTarget is specified, this is gets the handle of the window at the x and y coordinates
     y: See above
   Returns: string
   Comments: Gets the ID of the control specified
Go to Top of Page

Rob

USA
2615 Posts

Posted - 06/25/2012 :  17:12:13  Show Profile  Visit Rob's Homepage
Added in 2.0.11:

acShowSettings()
   Returns: integer (always 1)
   Comments: Shows the Settings window
Go to Top of Page

Rob

USA
2615 Posts

Posted - 07/03/2012 :  01:23:06  Show Profile  Visit Rob's Homepage
Added in 2.1.6:

acConsumePhysicalInput(value)
   Parameters:
     value: (0 for False, 1 for True) whether S+ should consume ALL physical (mouse and keyboard) input.
   Returns: integer (always 1)
   Comments: Instructs S+ to consume all input other than its own. This may be useful if you're about to call a mouse or keyboard action where you don't want any physical input to interfere with the action. But make sure you call again, passing 0 [acConsumePhysicalInput(0)], within the SAME Lua script to enable input or your computer may become unusable!
Go to Top of Page

Rob

USA
2615 Posts

Posted - 07/19/2012 :  10:20:33  Show Profile  Visit Rob's Homepage
Added in 2.2.5:

acGetMouseCursorType()
   Returns: string
   Comments: Returns the name of the cursor type as:
ARROW, IBEAM, WAIT, CROSS, UP, SIZENWSE, SIZENESW, SIZEWE, SIZENS, SIZEALL, NO, HAND, APPSTARTING, HELP, or Unknown
Go to Top of Page

Rob

USA
2615 Posts

Posted - 08/16/2012 :  12:36:24  Show Profile  Visit Rob's Homepage
Added in 2.2.9:

acAutoHideMouseCursor(hidetimer, rehidetimer)
   Parameters:
     hidetimer: How long (in milliseconds) to wait without mouse movement before hiding the mouse cursor. Passing 0 (zero) disables auto-hiding.
     rehidetimer: How often (in milliseconds) to rehide the mouse cursor if it should be hidden (in case another applications re-displays the cursor).
   Returns: integer (always 1)
   Comments: Auto-hides all standard mouse cursors based on the specified timers

acHideMouseCursor()
   Returns: integer (always 1)
   Comments: Hides all standard mouse cursors.

acShowMouseCursor()
   Returns: integer (always 1)
   Comments: Reloads all standard mouse cursors.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 09/12/2012 :  21:47:03  Show Profile  Visit Rob's Homepage
Added in 2.3.0:

acSendKeyDown(VKey)
   Parameters:
     VKey: The virtual keycode to send
   Returns: integer (always 1)
   Comments: Sends the key down event to the active window

acSendKeyUp(VKey)
   Parameters:
     VKey: The virtual keycode to send
   Returns: integer (always 1)
   Comments: Sends the key up event to the active window
Go to Top of Page

Rob

USA
2615 Posts

Posted - 10/14/2012 :  12:37:36  Show Profile  Visit Rob's Homepage
Added in 2.3.1:

acShowHotkeys()
   Returns: integer (always 1)
   Comments: Shows the Hotkeys window.
Go to Top of Page

Rob

USA
2615 Posts

Posted - 11/04/2012 :  14:07:10  Show Profile  Visit Rob's Homepage
Added in 2.3.8:

acRegistryCreateKey
acRegistryDeleteKey (will not delete if subkeys exist)
acRegistryDeleteValue
acRegistryGetNumber
acRegistrySetNumber (stores as DWORD)
acRegistryGetString (supports REG_SZ and REG_EXPAND_SZ)
acRegistrySetString (supports REG_SZ and REG_EXPAND_SZ)

Note that you may encounter issues with these if you are not running S+ with administrator privileges or are running with conflicting platforms, such as 32-bit S+ and 64-bit Windows.

I'm no longer going to post the full signatures and notes here since the help and available actions displays that information already.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000