Jump to content

shmuelw1

Active Members
  • Posts

    21
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

shmuelw1's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Does the above code work by AutoIt moving the mouse? Is this something you can see, or does it happen instantly without noticing it? I came up with some simpler code, but you have to wait while it clears the phantom icons. In order for this to work, you have to make sure the program icon is always visible on the taskbar which you can do by just dragging the icon from the upper part of the system tray to the taskbar or by selecting in Windows Settings that the icon should always be on the taskbar. This code just moves the mouse over the icons. If Mod($x, 10) = 0 Then MouseMove(@DesktopWidth - 150, @DesktopHeight - 15) MouseMove(@DesktopWidth - 600, @DesktopHeight - 15, 10) MouseMove(@DesktopWidth - 150, @DesktopHeight - 15) MouseMove(@DesktopWidth - 600, @DesktopHeight - 15, 10) EndIf The first and last lines are only necessary if you are closing and opening the program numerous times, and you want to clear them every 10 times of opening and closing the program.
  2. Thanks KaFu ! I see it's more complicated than I thought. If I want to change the resolution back to 1920 x 1080, can I just edit these two lines: DllStructSetData($DEVMODE, "dmPelsWidth", 1366) DllStructSetData($DEVMODE, "dmPelsHeight", 768) or do I also need to edit these two lines: Local Const $DM_PELSWIDTH = 0x00080000 Local Const $DM_PELSHEIGHT = 0x00100000 Thanks much. Shmuel
  3. Can someone please simplify this for me and give me least amount of code to change the screen resolution to the attached screen capture? I don't understand why this needs to be so complicated. Thanks
  4. I have UAC disabled and I just fixed a script that would not work by adding #RequireAdmin. So it's worth a try.
  5. Thanks for the UDF. Can you add a function for testing whether the system volume is muted? Testing for _GetMasterVolume = 0 does not work. Mute apparently doesn't affect the volume level.
  6. Thanks for catching that. I fixed my original post.
  7. When I use the run function to open firefox, the top edge of the title bar is missing and the three buttons at the top-right of the window are black. See the attached pic. I'm using firefox 29.0.1 and Windows 7. This only started happening in this version of Firefox. (I now tried it in FF 30 and it's still a problem.) I was able to solve this by uninstalling and reinstalling FF, but when I opened FF with the run function it happens again, and the only way to solve it to uninstall and reinstall. Here's the code: If Not ProcessExists("firefox.exe") Then Run("C:\Program Files (x86)\Mozilla Firefox\firefox.exe") EndIf Any ideas?
  8. AutoIt is very useful and easy to use even for non-programmers (like me). Most of the examples in the Example section of the forum are somewhat advanced and not suitable for non-programmers who want to learn how to do simple things with AutoIt. I've attached a few simple scripts with lots of comments to help beginners. For more help on any function, press F1 when your curser is on the desired function name. Example01_MouseSwitchButtons.au3 Example02_HelloWorld.au3 Example03_CopyPasteNotepadToWord.au3 Example04_CopyPasteNotepadToWord_2.au3 Example05_OpenLinkInIE.au3 Additional simple AutoIt examples can be downloaded from here: '?do=embed' frameborder='0' data-embedContent>> P.S. Can somebody pin this topic?
  9. FYI - See this page for an explanation of "/c" and "/k": http://technet.microsoft.com/en-us/library/cc771320.aspx If that page goes away, do a search for "CMD parameters."
  10. I tried to start Skype via Task Scheduler, but when it started, it only ran in the background. Then I made an AutoIt script to open the Start menu, type the path to Skype and press Enter. That also didn't work. The Task Schedular claimed the process started, but I didn't see anything happening. After doing some research, I found out that the problem was that I selected the checkbox in Task Scheduler to run the task even when I'm not logged in. When you do that, Task Scheduler runs the task in the background, so you can't see the started program. I didn't see anyone mention this on the forum, so I thought I'd mention this here.
  11. Thanks Melba23 !
  12. Is there a way to ask for new Autoit features? On this page it says they can be added to the bug tracking sytem: But the link provided there (http://svn.autoitscript.com/trac) does not work.
  13. You definitely could use AutoIt for copy/pasting from one program to another. Below is a sample script that copies the title of a field, for example "Name," finds it in Internet Explorer, copies the name data in Excel, then waits for you to click in the Name field in Internet Explorer. When you click OK it pastes the name and goes to the next Excel field. ; Click on the top-left cell in Excel before running Opt("WinTitleMatchMode", 2) ; match any part of title Dim $answer While 1 ; continue loop forever WinActivate("Microsoft Excel") ; go to Excel WinWaitActive("Microsoft Excel") Send("^c") ; presses CTRL+c to copy cell WinActivate("Internet Explorer") ; go to IE WinWaitActive("Internet Explorer") Send("^f") ; presses CTRL+f Sleep(500) Send("^v") ; presses CTRL+v Send("{ENTER}") ; presses Enter to find the search item WinActivate("Microsoft Excel") WinWaitActive("Microsoft Excel") Send("{RIGHT}") ; presses Right Arrow to go to cell to the right Send("^c") ; presses CTRL+c to copy cell Send("{DOWN}") ; go down one row Send("{LEFT}") ; go one cell to the left WinActivate("Internet Explorer") ; go to Excel WinWaitActive("Internet Explorer") $answer = MsgBox(262145, " ", "Click in the field where you want to copy the text, then click OK.") ; 262145 makes the dialog box have OK and Cancel buttons and always stay on top If $answer = 2 Then Exit ; exit if Cancel is clicked Send("^v") ; presses CTRL+v WinActivate("Internet Explorer") ; go to IE WinWaitActive("Internet Explorer") WEnd
  14. I have a script to open a bunch of programs when I start the computer. I was using WinWaitActive to activate a window then type some text, but it was not working. It could be I was opening too many things at the same time. So I found an alternative to use WinSetOnTop, type the text, then use WinSetOnTop again to make it not be on top anymore. Just thought I'd mention that alternative in case it helps someone out there in AutoIt-land.
  15. I'm trying to create a small script to press a few keys after two mouse clicks. Below is the script that I wrote. For some reason it does the Send command after only one click, then it waits until I click again. #Include <Misc.au3> ; required for _IsPressed $dll = DllOpen("user32.dll") Dim $x = 0 While 1 While $x < 2 If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then $x = $x + 1 EndIf WEnd Send("{UP 4}{ENTER}{ENTER}") $x = 0 WEnd This version works after one click, and gives me 1 1/2 seconds to make the second click before calling the Send command. But I'd prefer to get AutoIt to wait for the second click without using the Sleep function. Any ideas? While 1 While 1 If _IsPressed("01", $dll) Or _IsPressed("02", $dll) Then ExitLoop WEnd Sleep(1500) Send("{UP 4}{ENTER}{ENTER}") WEnd
×
×
  • Create New...