Zeros at end of string being cut off when sending

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
codude
Posts: 128
Joined: 12 Nov 2015, 05:33

Zeros at end of string being cut off when sending

18 Oct 2017, 09:24

This script works for me except when the string ends with zeros. Zeros will show up correctly in the message box but when I send a string to a document the zeros are cut off. For example if my substrpart string is 50530-D00 and I send it to a document I get 50530-D . The string length and the number of zeros (If any) at the end of this string will never be consistent. I experimented some with SetFormat but I’m not sure that’s the right solution for this problem. Any ideals here? Thanks

substrpart = %Clipboard%
MsgBox, %substrpart%
Send %substrpart%
User avatar
Gio
Posts: 1247
Joined: 30 Sep 2013, 10:54
Location: Brazil

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 09:32

Hello Codude.

This worked for me (i sent it to notepad - hotkey F3 was added for ease of call, clipboard contents set to your example):

Code: Select all

f3::
clipboard := "50530-D00"
substrpart = %Clipboard%
MsgBox, %substrpart%
Send %substrpart%
Is this not working for you? Have you checked if it works when sending to another text editor (notedpad)? And is this the actual code being executed in your script (or is it some form of "similar" code)?
walfredo
Posts: 21
Joined: 22 May 2014, 19:32

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 10:02

I tried as well, sending the output to multiple programs, with no problem. I even tried some problematic-when-it-comes-to-send programs I have and they all accepted the full string just fine.
Gio is right-- must be something else going on.

Does
substrpart = 50530-D00
in place of
substrpart = %clipboard%

behave the same way as well? Assuming this part of a larger script, try that in addition to renaming your variable in this one section.
codude
Posts: 128
Joined: 12 Nov 2015, 05:33

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 12:25

Thank you for the quick responses here. I tried Gio’s solution and suddenly now all I get is 553-D. This reminded me of a problem I have with this desktop here at the house. The number pad Zero works but the zero numerical key underneath the function keys does not work and I have not able but been able to troubleshoot this. It is for sure not a keyboard issue and probably not a hardware issue. Wanted to wait till I got to the office to try that computer which is the exact same build as my home computer and sure enough everything works fine there. Is there or maybe a work around here for my home computer other than fixing the zero issue which no one seems to be able to fix without formatting my hard drive and starting over. I have remapped the numerical zero key to the number pad zero in AHK and this is resolved some of my issues apparently not this one. Thank-You
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 12:50

I was going to say that it might be your zero key issue (if other methods didn't help). Have you tried any other forums?
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 128
Joined: 12 Nov 2015, 05:33

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 13:38

Yeah, you have been tracking this problem for some time now. I’ve tried several different forums and the general consensus is its some type of malware. I have paid a fair amount of money for a couple different downloads but none of them have solved this issue. It’s taken me so long to get this computer set up the way I want I would hate to have to start all over. Was thinking about bringing the computer into Staples and see if they can correct this but I’m not sure how sharp these guys are. I think it would be better to have someone login into my computer try and solve this issue but there are so many of those services out there I would like to get one that comes well recommended. Any ideas out there? Thanks
walfredo
Posts: 21
Joined: 22 May 2014, 19:32

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 14:16

codude wrote:I’ve tried several different forums and the general consensus is its some type of malware. I have paid a fair amount of money for a couple different downloads but none of them have solved this issue. It’s taken me so long to get this computer set up the way I want I would hate to have to start all over. Was thinking about bringing the computer into Staples and see if they can correct this but I’m not sure how sharp these guys are. I think it would be better to have someone login into my computer try and solve this issue but there are so many of those services out there I would like to get one that comes well recommended. Any ideas out there? Thanks
What kind of PC is it? What OS? I'm sure you already saw the Fn posts in various places online.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zeros at end of string being cut off when sending

18 Oct 2017, 15:32

Did you try SharpKeys, I think that's the utility I had in mind. By the way I would be cautious about using it. It's the only thing I can think of that I might not have already mentioned, or at least, you could investigate the registry keys it alters, without actually changing them.

Another idea is whether you changed language keyboard layout, i.e. if you've noticed any other keyboard issues.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 128
Joined: 12 Nov 2015, 05:33

Re: Zeros at end of string being cut off when sending

19 Oct 2017, 08:34

Hey guys, thanks for the responses here. This is a home built desktop system running Windows 7. Yes most of the post mentioned that Fn key but that seems to be unique only to laptops. I will look into the SharpKeys. I’m quite certain the keyboard language settings are okay. I built three of these computers at the same time and kept them all identical so I can compare settings from other computers when I have issues. I do have another issue that has come up with this zero problem computer but I don’t think it’s related. If I have to shut this computer down it takes hours to restart but it does always eventually restart. I try to break into the bios during this startup period but I’m not able to. Does this seem like a motherboard issue? When I purchased the components to build these three computers I did purchase an extra motherboard so I could keep all these computers identical if one needed to be changed out.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zeros at end of string being cut off when sending

19 Oct 2017, 15:05

I don't think this is necessarily relevant to your problem, but I thought I could at least mention it. Is the restarting slow after or before Windows has shutdown?

Code: Select all

q:: ;force shutdown PC in 10 minutes' time
vMin := 10
vSleep := vMin * 60
Run, C:\Windows\System32\shutdown.exe -s -f -t %vSleep%,, Hide ;force shut down PC in 10 minutes' time
;Sleep, 1000
;Run, C:\Windows\System32\shutdown.exe -a,, Hide ;abort shutdown
return
I don't know much about hardware, but you could try and find any tools that do diagnostic test on your hardware, and see if any bad results come up. Or store results for all your PCs in text files, and use something like WinMerge to compare the text files.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
codude
Posts: 128
Joined: 12 Nov 2015, 05:33

Re: Zeros at end of string being cut off when sending

20 Oct 2017, 12:10

Thanks for that shutdown script. I tried it and it did not seem to have any effect on the startup. The startup that I’m attempting starts from a desktop machine it is completely powered down so I would think this restarting is slow after Windows has been shut down. Just a few other clues maybe here. This problem started with a slow start up where Windows and I believe Bios were not booting for maybe 5 to 10 minutes but suddenly now its hours. I have caught it in the startup a few time after walking away from the machine and it seems I’m getting some notices about Windows not properly been shut down as it starts Windows which made me think maybe this shut-down script would have some affect but it did not seem to. On these testing tools you mention here. Would that be something like Hiren’s BootCD? Hopefully this weekend I will get a chance to try some of these other suggestions.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Zeros at end of string being cut off when sending

20 Oct 2017, 12:19

I actually don't know of any specific tools, or very much about hardware, I was thinking that perhaps you could retrieve some information via AutoHotkey, although I don't know what information specifically to look for.

That problem sounds like it might be quite serious, so you should back up everything etc. Maybe you do have 2 separate/connected hardware problems, or 0/1 hardware problems.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ArkuS, Descolada and 125 guests