Jump to content

martin

MVPs
  • Posts

    7,148
  • Joined

  • Last visited

  • Days Won

    2

martin last won the day on April 13 2012

martin had the most liked content!

About martin

Profile Information

  • Member Title
    ~~\o/~~~/0\=¬''~~~
  • Location
    uk
  • Interests
    Automated machinery design and control<br />photography<br />piano

Recent Profile Visitors

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

martin's Achievements

  1. If you want to send a binary zero then sending a string won't work. You need to use _CommSendByte, or if you have a few bytes to send you can use _CommSendByteArray. There is an example of _CommSendByteArray here https://www.autoitscript.com/forum/topic/128546-serial-port-com-port-udf/?do=findComment&comment=1130587
  2. That link is now broken. But maybe this one might be helpful for some https://blog.csdn.net/analogous_love/article/details/42264605
  3. The window title doesn't change for me. The script works so I don't see a problem. Maybe there is some problem because of a different language - my PC is Windows 10 and the language is English (UK).
  4. Hello Adnadeau, Apologies for the delay - I rarely visit the Autoit forums now. Thanks for the feedback. I will investigate what you have told me and I will correct the files in the zip. It might be a couple of weeks before I get back with something. Martin
  5. I haven't investigated your problem but it might be that you could send "^{END}' to the edit with ControlSend and that should make it scroll down I think.
  6. Here is a 64 bit version for someone to try. Any feedback would be appreciated. The dll is COMMG64.DLL. The example script is Commg64Example.au3 and the UDF is CommMG64.au3. The only changes to the AU3 scripts for the 64 bit version is that I have simply replaced CommMg.au3 with CommMG64.au3 and commg.dll with commg64.dll. COMMG64.zip
  7. I don't know why setting the paper size wasn't ever included in the udf, but if you still need this I will try to add something. If I don't see a reply over the next week then I will do nothing on the assumption that I am too late to help.
  8. Tooltips can be made to work in W10 when an app is maximized if the maximum window size is set to be larger than the screen size. I added this information to post 1.
  9. Thanks argumentum, I hadn't thought of that even though I sometimes use 2 monitors myself. I've changed the code but it might not survive long.
  10. Maximized Windows in Windows 10 usually (for me) don't show tooltips or hints. For a short time following a WIndows update this was fixed on my laptop but after another day, and maybe another update, the problem returned, so I don't understand what the conditions are. The script below checks for maximized windows and sets their size to a few pixels less than the screen size and this brings back tooltips. I have found another way to fix the problem which might help some people. There are several programs I use regularly and the tooltips are important. On the programs I compile the tooltips help my users if they are not familiar with using the programs. If I set the maximum window size to be greater than the screen size ( @DesktopHeight/@Desktopwidth) then when maximized it still fits the screen ok but the tooltips still work. This can be done in AUtoIt with GUIRegisterMsg($WM_GETMINMAXINFO, "MY_WM_GETMINMAXINFO")---- (search for examples) In Delphi it can be done with Form.Constraints. I don't know about other languages. For apps where the maximum size can't be controlled the script below could help someone; it helps me at least. Const $SPI_SETWORKAREA = 47, $SPI_GETWORKAREA = 48, $SPIF_SENDCHANGE = 11 $StartRect = DllStructCreate("int[4]") $PStartRect = DllStructGetPtr($StartRect) $res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0) $maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1) $maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2) While 1 $aList = WinList() $res = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_GETWORKAREA, "int", 0, "ptr", $PStartRect, "int", 0) $maxwid = DllStructGetData($StartRect, 1, 3) - DllStructGetData($StartRect, 1, 1) $maxht = DllStructGetData($StartRect, 1, 4) - DllStructGetData($StartRect, 1, 2) For $i = 1 To $aList[0][0] If $aList[$i][0] <> 'Program Manager' Then $ws = WinGetPos($aList[$i][1]) if isarray($ws) then;for some reason it isn't always If $aList[$i][0] <> "" And $ws[2] > $maxwid And $ws[3] > $maxht Then WinSetState($aList[$i][1], '', @SW_RESTORE);because changing the size leaves it as maximised as far as Windows is concerned! WinMove($aList[$i][1], '', $ws[0],$ws[1], $maxwid, $maxht) Endif EndIf EndIf Next Sleep(5000) WEnd 25th January 2016. WIndows 10 had a major update overnight on my PC. Now the problem with missing tooltips has gone. I din't know Microsoft studied these forums so carefully. So this means this script is no longer needed by me or anyone else. 24 Jan 2016 Edit again after Argumentum pointed out more than one monitor not allowed for. Not certain this is still correct but will test it with another monitor during next few days. 24th Jan 2016 Improved to use working area of desktop because the Taskbar and other apps can use up some of the desktop, so a maximised window is not necessarily to desktop size. (I tried testing for @Maximized but it failed, and I didn't spend any time worying about why though it would be better.)
  11. Your bug report needs to be redirected to Microsoft I think Have a look at the definition of windows styles WS_DLGFRAME Creates a window with a double border but no title. So you cannot have a caption and the WS_DLGFRAME style.
  12. That's beyond what I was looking at though the effect might be related. The help makes no claims about controlclick working on hidden windows and even warns that it is best to activate the target window before using controlclick, so I think expecting a control on a hidden AutoIt window to respond is a bit optimisistic.
  13. Yes, I agree that it's odd which is why I started the thread. But we discovered that using using GuiSetState(@SW_HIDE) stops messages from most controls and they aren't turned on again using WinSetState(...,..,$SW_SHOW), but if you hide the gui using WinSetState then when you show it again with WInSetState everything works. In my opinion its a bug but it's pretty trivial to get round and it will only happen very rarely so I'm not going to worry about it.
  14. @BrewManNH You are seeing the codes for MouseDown and MouseUp I think.
  15. Yes, I hadn't thought of trying that. It shows exactly what I'm saying and it gives the solution. If instead of GuiSetState(@SW_HIDE) I can use WinSetState("Child","",@SW_HIDE) and that works $ch = GUICreate("Child",300,300,10,10) $testBtn = GUICtrlCreateButton("Test",100,100) GUISetState() sleep(500) winsetstate("Child","",@SW_HIDE) while 1 $Msg = GUIGetMsg() if $msg = -3 then Exit if $msg = $testBtn then msgbox(262144,"result","button pressed") WEnd Thanks czardas
×
×
  • Create New...