Announcement

Collapse
No announcement yet.

Sendkeys Syntax to Zoom In the screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BioHazard
    replied
    Originally posted by BioHazard View Post
    ... Am going to run some remedial cleanup...
    Right, have done a thorough system diagnosis and cleanup. I did find some very suspect spyware lurking in the background and a cleanup did restore things to normal.

    Then re-ran this demo and had no problems whatsoever during the first execution. But during 2nd and subsequent executions, the problem returns. I get a hung application after running that first example with notepad. And have to do a force-close.

    Have not been able to identify the source of the issue. It's very strange.

    Have thoroughly examined the code in that example and can't see any problems. At all.
    Does anyone else get issues after running this? With particular regard to that first example?

    Nb.
    herrin
    Good example of some lateral thinking, there. Always more than one way to skin a cat, eh?
    Nice one, mate.

    Leave a comment:


  • herrin
    replied
    alternative



    Code:
    [ATTACH]n303103[/ATTACH]


    Click image for larger version

Name:	screen.PNG
Views:	185
Size:	14.3 KB
ID:	303102

    Leave a comment:


  • BioHazard
    replied
    Ah yes, actually. Seem to be getting some sporadic results with the application hanging. It quite often'fades out', requiring a force-close. Been trying to isolate the issue:

    eg.



    Did a reboot to clean up any processes hanging about in memory which might've been conflicting. Seems to have helped somewhat - but it's still hanging after running the first example. The other functions seem to be okay, provided that first example is not clicked. Seems to be isolated to that event.

    The Zoom example's working okay now (which is was what he was actually after) so if he just isolates that function and adds in a code for the reverse Zoom. ie. AutoIt.Send("#{NUMPADSUB}",0) then he should be good to go.

    Nb.
    I'm running under Win7 Ultimate x64 - though I don't think it's a platform issue. There may actually be a foreign process hanging about in my system processes causing the clash, so don't fret just yet. Am going to run some remedial cleanup because i do seem to be running a little lite on sysyem resources.

    Leave a comment:


  • charliechaps
    replied
    Hi BioHazard ,
    That example I posted, uses the AutoItX3.dll file in the root directory,
    I compiled to web/email exe with no admin and it worked OK on win7 x64 and win10 x64 without crashing.
    Did example crash on yours?

    Leave a comment:


  • BioHazard
    replied
    Given that the AutoIT plugin is not compatible with AMS-8, you might have to just compile an AutoIT script and embed the executable in your project. The following .au3 scripts will do the job:

    Zooming In: Send("#{NUMPADADD}",0)
    Zooming Out: Send("#{NUMPADSUB}",0)

    ... Or you can do the same thing with AutoHotKey. These .ahk scripts will work:

    Zooming In: Send #{NUMPADADD}
    Zooming Out: Send #{NUMPADSUB}

    AutoIT will compile to slightly smaller executables. And give you the option to compile to x86 or x64. So is probably the better option of the two.



    Nb.
    One other option would be to drop the AutoItX3.dll into your project and call it directly via the 'AU3_Send' function - that's if you can get the syntax correct for the above call parameters. Have tried a bunch of iterations already but always causes the process to crash.

    Leave a comment:


  • herrin
    replied
    [CODE] (AutoIt.Send ("#{LWIN}", 0) [/CODE


    Leave a comment:


  • AndrewX
    replied
    @charliechaps
    Thanks a lot for the example.
    You have solved a big problem, very appreciated.
    Good job!

    Leave a comment:


  • charliechaps
    replied
    Hi Andrew,
    Found an example autoit by Colc and after a bit of work modified it for you (added action plugins to docs folder)
    in case you don't have them

    AutoIt_Examples_Modded.apz

    Leave a comment:


  • AndrewX
    replied
    Thanks guys for your time.
    Unfortunately, I don't know how to include Autoit.
    My "dirty" solution is a small executable created with TinyTask, an automation app.
    I've attached the Zoom In .exe. but I think in the future it will be targeted as malware from same Antivirus. Obviously it's a false positive but the problem is this.

    If anyone can help me with Autoit ...
    I need only two button to zoom in and out nut I have no idea on how include the code.

    Thanks anyway.
    Attached Files

    Leave a comment:


  • herrin
    replied
    Originally posted by herrin View Post
    SendKeys doesn't support the Windows key., For this you have to use autoit
    I confirm the impressions of Bio



    I am a new developer. I have a question. I'm sorry that my english is bad. I have a button in my project and get the button "alt" + "shift" operation on the keyboard in one click. smp image : http://prntscr.com/mcryzm





    Leave a comment:


  • BioHazard
    replied
    I had a look at that but after studying the coding comments left by Worm, came to the same conclusion as you. That's certainly the logical choice of syntax - but it just won't work. Have also tried wrapping the {+} string in parenthesis (as Worm indicated this as the syntax for combining a function-key with a character-key) but to no avail.

    SendKeys("{WIN}") will work on its own but there seems to be no way of combining it with the plus-key expressed as a literal string. The WIN key can also be caught by simulating CTRL+ESC via SendKeys("^{ESC}") but this also fails when trying to append with the plus-key.

    Quite the mystery???

    Leave a comment:


  • AndrewX
    replied
    In addiction I specify that my project is baset on Keystrokes.dll and not on Keystrokes executable or Luacom Keystrokes.

    Leave a comment:


  • AndrewX
    started a topic Sendkeys Syntax to Zoom In the screen

    Sendkeys Syntax to Zoom In the screen

    Hi all, I tried all the day without success.
    I need to emulate Win+ key combination to zoom the screen.
    Last command for me was

    SendKeys("{WIN}{+}")

    Please help me to find correct syntax.
    Thanks
Working...
X
😀
🥰
🤢
😎
😡
👍
👎