Autohotkey works different on different workstations - automation

I wrote a script using autohotkey, which has to execute a few clicks inside a window. Mostly, I used the ControlClick function to do the job, and it works well. I had to click a chechbox, and for that I used the MouseClick function.
I used relative coordinates for the functions (relative meaning x and y starting from the top left corner of the current active window).
If I run the script on my PC, it activates the window I want it to correctly and does what I programmed it to, but when I compile an executable and run it on a different workstation (I change only the workstation, not the programs in use, not even the operating system), it just doesn't work, I have the feeling it confuses x coordinates with y coordinates, the sleep function doesn't work anymore...
My actual question would be how can I make sure the script runs the same in any conditions? How can I make sure I select the right window, can't I select it using something different than it's title? Maybe a class, or something more specific?
Thanks a lot :D !

It was woking differently because the screen resolutions were not the same, so if I clicked at x100 y100 on 1280x1024, it was not the same as x100 y100 on 1920x1080 (relative coordinates), so I had to scale the coordinates, and after doing this, it worked.
If one has same problem as I did, I hope this will be useful :D .

Related

IntelliJ doesn't display... at all

I have a bug which is completely over the planet. IntellIJ doesn't display. It's on, yet doesn't display.
It worked well before, last thing I did was re-setting up new dependencies on my code and (nothing to do with that) re-setting SDK for other reasons, both of which shouldn't be linked to display properties.
As you can see it's working, I see the pop up windows:
But doesn't display:
Yet I can see IntelliJ windows with Shift + Tab:
and yes, my screen doesn't duplicate, so it's not hidden in another dimension or something
I tried:
restart computer
uninstall install IntelliJ
uninstall install IntelliJ without previous parameters
try other JetBrains software, like DataGrip, it works and displays well
call a homeopathic doctor
Unsuccessfully. So I knee and await before your judgement of this critical situation.
I have this exact same behavior happen to me when I use IntelliJ at work and then go home and try to use it via Remote Desktop. Its very strange (regardless of which monitor I leave it on at work when I leave).
If I hover over it in the task bar and then hover over the thumbnail for the running app, I can right click and tell it to maximize and it magically comes back into focus. Sometimes I have to tell it to restore and then to maximize before this works.
Occasionally even this doesn't work and I have to close it, re-open, and do the same. It makes no sense, so I understand your frustration.
It works
As John Humphreys - w00te mentionned, click right over the thumbnail (I insist: the thumbnail ! Not the taskbar icon) and then select maximize and voilà.
Bon appétit.
Thanks for your contribution and I hope it will help some people in need here.
I have had this issue when I have moved from a dual monitor setup to a single monitor setup or a different dual monitor set up. The issue here that intellij window seems to save and use the coordinates of the last dual window setup to render the window. It doesn't matter you restart your computer, it will always try and render to that position, even if that position is not visible on the new monitor set up. On windows there is an easy way to fix this issue. Go to your display setting and flip the order of the windows. The intellij window should now be visible. you can drag the window to the your other monitor and re-arrange the windows back to the order you had previously. After that, you can place the intellij window wherever you want.
In my case I noticed there is a 1 pixel thick gray line on my screen, turns out that was the IDEA window and I could resize upon hovering that line. Needless to say it wasn't me shrinking it.
I have this same behavior, It happens to me when I connect a monitor in extended mode and move the intellij window to the monitor, then disconnect without moving it back. No other solution other than to connect to monitor again and bring it back to the original window for me works.
On mac, select the app from the app tray so that the menu for it appears up top. Then on the menu up top, go to Windows->Zoom and it should expand to fill the viewport.
From there you can drag it down to size and reposition.

AutoIt select item from menubar

i want to build some automation code that will select some item from a menubar of minimized (or non-active) window.
I have tried to do it with ControlSend function by sending some keys like alt and directions, but it's not working...
See my example:
I want to select the item "Select All", for this i wrote this code:
WinWaitActive("")
Send("{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
The code above works good, but i want that it will work when the window is not active, so i wrote this line:
ControlSend("", "", "Term Class1", "{ALTDOWN}{ALTUP}{RIGHT}{ENTER}{DOWN}{DOWN}{ENTER}")
This is not working for me, do you have some idea how can i implement it?
I too was trying to work with minimized windows but have since switched from windows so i wont be able to test things out for you. I have been told (and from experience) that you cant use control send (or the mouse click alternative which is called "control click") on applications that do not come stock with windows (applications that dont come with the computer, to put it simply).
However i came upon this (https://www.autoitscript.com/forum/topic/7112-minimized-clicking-great-for-game-bots/) which seems to be a 3rd party add in that lets you do just that, i tried using it but could not make it fit my needs. Perhaps you can, I would try to get it working for you but again, i dumped windows. The above link is the best candidate i have found, and by far the most promising after i searched and tested for about a month a while back, Good Luck.
EDIT: As always, i do not promise anything from the above link, you use it at your own risk.

byobu not autoresizing and filling the window

I started a putty window, changed the font, and then did Windows-Left to fit it to the left side of the screen and it decided to do the screenshot below. The only way i've found to make it go away is the log off/on but that's obviously impractical and doesn't fix the problem.
I've had it in the past but not this bad. It usually happens when I move or resize the window. Is there a setting to have it just auto resize by default?
[edit] and then, about :05 later out of nowhere, it popped away. I'm just sitting here doing something else and it changed back to normal.
That means that you (or someone else) is connected to the same Byobu session from another computer with a smaller terminal size.
You should be able to kick the other session using Alt-F6.
Full disclosure: I am the author and maintainer of Byobu.
For mac user, by querying from the help info ctrl-a + ?, one could simply run the bash script $BYOBU_PREFIX/lib/byobu/include/tmux-detach-all-but-current-client to kick other sessions.

How to make tool windows remember their monitor and position in IntelliJ Idea 13

How to make tool windows remember their monitor and position in IntelliJ Idea 13?
Is there a way to do that?
I have 2 monitors with different resolutions.
I like to keep the main window of the IDE (and the code editor) on my laptop monitor and have the tool windows (Debug, Changes, Run, Terminal, Maven) on the second one at max width and height.
So What I do is to float them, max them on the second monitor and pin them there.
it works but every time I close the IDE, or sometimes during my day they get back to the main monitor again.
They kind of maintain their height and width (a few pixels less I think) but they appear huge in the middle of my smaller monitor.
This is the only draw back I have to say agains the IDE, and in Eclipse this kind of thing works as a charm.
Is there a way to solve it? Or a plugin?
Cheers
I had the same problem with Find window. Solution was to close IDEA (13.1.5) with all windows positioned as I like. It seems IDEA memorizes window positions only on termination.
I had the same problem, and today I found this in jetbrains help website:
Save the arrangement of tool windows:
From the main menu, select Window | Store Current Layout as Default.
the url is: Arrange tool windows

Vb Can You Run Another Program Inside the one you are making.

Hello All I was Wondering if it was possible to run another program in a window inside you're vb program? So here is what I was thinking I want to make a window with like three buttons at the top. Stop, >, >> The too arrows would be the speed. Then I want another window below this to run a program called NCO view which is a Cnc simulator. Is This even Possible? If so can I know where to start and where to find information on this.
Your question is a bit ambiguous and can't figure out what you're expecting really but YES this is totally possible in vb.net.
If you've got several process simultaneously, you can launch them on different threads. (Parallel programming)
And if you need several forms you can proceed by using Modal form: follow link