Autodelete dollar value when it pulls up

Get help with using AutoHotkey and its commands and hotkeys
mkkk
Posts: 2
Joined: 31 May 2018, 08:13

Autodelete dollar value when it pulls up

31 May 2018, 08:19

Hello,

I just started AHK and only now the very basic. I use AX dynamics at work. When entering a certain part number into AX, it pulls up a dollar amount and I need to manually delete it or change it to $0.00
so in AX, when $32.00 populates, I want it to be deleted or replaced with $0.00

Can anyone help me with a script please?

TIA
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Autodelete dollar value when it pulls up

31 May 2018, 14:30

Hello, you need to be more precise about your use case.
i.e. what you mean by pulls up, do you have focus on the field? etc.

Ahk would need to get the value, make replacement and place back the new value.

You could maybe get the value of the field and use regexreplace() to replace the $ value, and then Send command or ControlSetText command to put the "0" valkue you want.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
swagfag
Posts: 2998
Joined: 11 Jan 2017, 17:59

Re: Autodelete dollar value when it pulls up

31 May 2018, 15:08

i think he punches in some ID and gets a list of entries spat back at him that somewhere in there include a field for the dollar amount that he needs zeroed.
maybe ControlSetText will do if u can manage to locate a control
mkkk
Posts: 2
Joined: 31 May 2018, 08:13

Re: Autodelete dollar value when it pulls up

07 Jun 2018, 11:28

DigiDon wrote:Hello, you need to be more precise about your use case.
i.e. what you mean by pulls up, do you have focus on the field? etc.

Ahk would need to get the value, make replacement and place back the new value.

You could maybe get the value of the field and use regexreplace() to replace the $ value, and then Send command or ControlSetText command to put the "0" valkue you want.

I'm using AX Dynamics, in the line detail fields, I have to type the part number and it will populate the price $32.00 . I would like to auto-delete the $32.00 . Would you be able to help with a script?


Thanks
Guest

Re: Autodelete dollar value when it pulls up

08 Jun 2018, 14:27

swagfag wrote:i think he punches in some ID and gets a list of entries spat back at him that somewhere in there include a field for the dollar amount that he needs zeroed.
maybe ControlSetText will do if u can manage to locate a control

You are correct. I am not familiar with ControlSet, would you be able to help with a script please?

Thank you!
DigiDon
Posts: 178
Joined: 19 May 2014, 04:55
Contact:

Re: Autodelete dollar value when it pulls up

09 Jun 2018, 01:59

We can not put a script together if we do not have at least the control class name of the control (that you can get by autohotkey window spy). Actually that will not be easy without having the software you use.
You should look at autohotkey help file on these commands to understand them.

That will probably look something like that

Code: Select all

ControlGetText, OutputVar , Control, WinTitle
If instr(OutputVar, "$") 
ControlSetText , Control, 0.00$, WinTitle
That you can trigger either via a hotkey or using a timer (settimer) and if Winactive command
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic
Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
Sorry I am working hard at the moment at a new job and can't commit on delays of answers & updates
Guest

Re: Autodelete dollar value when it pulls up

11 Jun 2018, 12:08

DigiDon wrote:We can not put a script together if we do not have at least the control class name of the control (that you can get by autohotkey window spy). Actually that will not be easy without having the software you use.
You should look at autohotkey help file on these commands to understand them.

That will probably look something like that

Code: Select all

ControlGetText, OutputVar , Control, WinTitle
If instr(OutputVar, "$") 
ControlSetText , Control, 0.00$, WinTitle
That you can trigger either via a hotkey or using a timer (settimer) and if Winactive command

Thank you! I will follow your advise and try to learn the commands.

Return to “Ask For Help”

Who is online

Users browsing this forum: Flipeador, Google [Bot], Gully, joefiesta, leo007, SuperFoobar, Trymado and 72 guests