New Guy here. This is a two-part question, hopefully easy enough though. I know it's ugly coding, this is because I have only a couple hours worth of coding experience and could really use some help.
1) When I single click the button I want one action (like playing a sound clip) and when I double click the button I want a different action (such as opening dialogue box to ask for soundclip directory address). At the bottom of the script I made a comment which one I would like single click versus double click.
2) I can not get the FileOpenDialogue to save the file address to the config.ini file at the 'One' position on the .ini.
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <AutoItConstants.au3> #include <Sound.au3> Opt('MustDeclareVars', 1) Opt("GUIOnEventMode", 1) Global $OneID _Main() Func _Main() GUICreate("Form1", 156, 86, 281, 276) $OneID = GUICtrlCreateButton("Button", 15, 17, 122, 37) GUICtrlSetOnEvent($OneID, "OnOne") GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit") GUISetState() While 1 While 1 Sleep(1000) WEnd WEnd EndFunc ;---------------Functions------------- While 1 Sleep(100) WEnd Func OnOne() ; ******************Single Click for this action**************** $OneID = IniRead("config.ini", "Config", "One", $OneID) If $OneID = True Then SoundPlay($OneID, @HotKeyPressed) Else ; *******Double Click for this action*****And Help Saving File Address to config.ini 'One'*********** $OneID = FileOpenDialog("Select file", @WorkingDir, "All (*.*)") IniWrite("config.ini", "Config", "One", $OneID) $OneID = InputBox("Enter Information", "Short Name for File?", "") IniWrite("config.ini", "Config", "NameOne", $OneID) EndIf EndFunc Any help would be greatly appreciated, and if you need anymore clarity as to what exactly I'm trying to do, please do not hesitate to ask. Thanks so much!
Hi folks, I'm having problems with a screenshot capture script.
Let me explain.
Everyday I (and my colleagues at work) need to take some screenshots from a web-page. These screenshots are used to compile a report. Normally, I (and others) used to log in into the website and took screenshots of desired graphics and tables. This is tediuos and time consuming. To easy this task I made a script using autoit that basically logs into the website (user and password) and using some clicks, stroke send, coordinates, it is able to generate the graphics and save them to some folders into our network (this script saves arouund 50 pics. It works like a sharm.
In order to make things easier, I tried to schedule this script (compiled to a Screnpics.exe file) using task scheduler from windows. We already use this (task scheduler) to run some vbs scripts, some vba excel scripts and so on. The computer used for this tasks is a windows 7 desktop computer. Due to security policies, the computer locks after some time. All this tasks run in the locked computer.
My script screenpics.exe runs also from this locked computer. When the computer is unlocked, it does everything as expected. But, when it is locked, all the "pics" are BLACK. As I understand, it runs ok, but, as the "windows" are innactive, it prints what it "sees": a black rectangular.
Some details: The web-page with hold the information I need, it only works in Firefox and, because of this it couldn`t be managed by vba or some "getobject" like commands. In fact, it has some flash things that make it impossible to control programatically. So my script is based on mouse move to coordinates, mouse click, screen capture and so one.
So, I read many posts trying to figure out a way to overcome this, but... nothing came to mind. My first idea was try to unlock windows. Theses lead me to some posts with no solution. This is worse because I'm not a computer admin, so procedures that need to replace/change the register are not an option.
If someone has any idea, I'll be gratefull.
I was looking for a toolbar modification for SciTE and I was checking various versions of SciTE that were available on the internet. They all had some problems for how I wanted to use the editor, so I looked here to see if there were any toolbar modifications for Scite. I found one very old script by YogiBear (Volly) from 2006 that looked promising, though there were issues with it. I decided to see what I could do to modify this script, and make some improvements to it if possible. This script is the result of that work.
It's not perfect and definitely could use some tweaking, but I thought that it had matured enough, and was mostly stable enough to release the updated version.
Minor update to remove all the old Obfuscator directives and replaced them with #Au3Stripper directives instead. I also corrected a minor bug that only showed up for me on one computer I tried this on, and caused the tool bar to crash for others as well.
SciTE toolbar version 2.0
Changed the settings values to use constants instead of 'magic numbers' The icons on the toolbar weren't lining up with the separator characters or with the toolbar GUI because they weren't set with the resize setting for the icons, only for the separators. Changed to using arrays for everything, it makes it a lot easier to loop through the controls Added a line to use an alternate path to the SciTE program, so you can start it using, for example, the portable version instead of installed version for those that don't install AutoIt and/or SciTE4AutoIt3. It will accept a commmand line parameter that points to the SciTE executable. Removed a lot of Global variables by moving the GUI creation and monitoring to the Main function and passing variables from it. I embedded the icon files into the script so that there isn't a separate download of the icon files used here. Saves download time and makes the package smaller. Modification of tools is easier because the icon names, tooltip text, and SciTE command codes are saved in the INI file upon first start up. These can be modified after the script has been run once, even after it's been compiled, by changing the ini file information, you can modify this script to automate it, or you can change it manually in any text editor. The icon files are now using, in just my opinion, better looking icons, after all it's been 7 years and icon files have matured. I have included a file with all of the constants that SciTE uses for its menu commands which comes from the SciTE source file "scite.h", so you can use this file to help you modify the commands that the toolbar works with, by figuring out what each of these values represent in SciTE. The core of the script is pretty much the same, I've just fixed a couple of issues that it had, tweaked a few things, added some new functionality and "prettied" it up a bit.
If anyone has any suggestions as to improvements, bugs/bugfixes, etc. please let me know.
I have a button where I need to close it!
I was doing through clicking same position in screen but there are some id's that have different sizes.
What are the possible ways to click this closable button?
Is there a way to close it through id? Is there a way to get it's position through it's ID?
Thanks in advance!
Not the most eloquent nor efficient, to be sure, but with the following functionality:
MULTI_BAR Features: ----------------------------------------------------------------
* Floating MULTIBAR Toolbar with four(4) Docking Positions
* Drag MULTI bar to Dock at any Edge position
* Drag Edge bar to screen center to Float as a MULTI bar
* FADING EDGE BARS for LEFT, TOP-LEFT, TOP-RIGHT, RIGHT Sides
* All 4 EDGE BARS and MULTI BAR can exist and execute at one time
* All Toolbars use common INI file format
* Any Toolbar can be displayed by any positional Service EXE
* All ToolBars have common Controls
Return to calling BAR [ORIGIN}
Manual Edit the INI file [INIEDIT]
Create and place a NEW Toolbar on a button [NEWBAR]
Search Icon Initiator - search for a Toolbar or a Button Function
Set AUTO mode for EDGE bar show/fade on cursor or click, [AUTOSW]
Set AUTO mode for FLOAT bar to close or stay open on button click [AUTOSW]
Rotate thru 3 button sizes, small, medium and large w/label [B-SIZE]
EXIT this bar [EXIT]
* User specifies Number of BUTTONS and Number of ROWS
* Change Dynamically Number of BUTTONS or ROWS
via NEWBAR Function Specifying SAME BARNAME with Changed BUTTONS & ROWS
* Three(3) Button sizes - User can change on demand
* Shrink to Fit - Will Auto reduce Button size on DOCKING if Bar too long
* Buttons can be any File OPEN function, web link, or Open another TOOLBAR_BAR
* ToolBars can be cascaded down(DRILL DOWN - Button points to another ToolBar) to additional Toolbars
with Return to previous Toolbar via Origin Function
* 2 BAR TYPES:
ACTION(Buttons do TOOLBAR, FILE or URL OPENS)
User drops a Link on Button
DROP(Buttons are Folder Targets)dropped files are sorted to destination
MOVE or COPY: FILE, FILE(s) or FOLDERS(DIRs) to Button target
Recycle Bin(a Shortcut) is supported as a DROP target for FILE, FILE(s) or FOLDERs
* Button Context functions
DELETE the current function - empty the button
EDIT the TOOLTIP for this Button
EDIT the LABEL displayed on Large Button
PLUCK this Button for move to new location on this bar -or-
ANY other Bar (in this TOOLBOX)
PLACE any PLUCKED Button, or PLACE any NEW TOOL_BAR
OPEN file location of Button file
UNZIP the attached to a folder which will be the folder for all toolbar definitions
and executables. THIS FOLDER IS YOUR TOOLBOX.
TOOLBOX\MULTIBAR\]README.doc or ]README.pdf provides detail on functions and implementing.
Appreciate all the SILENT help from the AUTOIT community for this and my many projects. Thanks to all menbers who have provided the best self help book on applied AutoIt.
Please advise on errors or suggestions. MULTIBAR was developed on Windows 10. Other targets or themes may present errors.For your personal use. Accept no responsibility for its functionality. Enjoy, olbitpicker