Have an issue with our shipping software at work. Need a small script (I'm assuming it'll be fairly small. Maybe a few dozen lines at most.)
When we save an order, we have a macro within the program that makes the packlist number the same as the order number (PACKLIST_ID = ORDER_ID). It just makes things easier to find that way. When items are backordered, the program can backorder to a new order with a -1, -2, etc behind it. (i.e. when order 133492 has something backordered, the backorder becomes 133492-1. If -1 has a backorder, that backorder becomes -2, and so on. So when the backorder is saved after shipping it, the packlist number gets the -1, etc.
However, when you introduce a delivery schedule (items are to be shipped at certain dates in the future, say one shipment today, another a month from now) this cannot be done. So when you backorder an order with a delivery schedule, it does not do -1, -2. It stays the same order. This is by design of the program. Which makes me wonder if this particular feature can be changed, but I'll continue on the assumption it cannot. Thus, as a result, a month from now, when we ship the second part of the delivery schedule on an order, the macro will try to make the packlist number the same as the order number. This cannot happen, because that packlist number was already taken when it was shipped the first time. It won't save because of this error. I have to go in and manually delete the macro, put in my own packlist number, save it, then reenter the macro. This is nothing short of a nuisance. I don't want all my guys to have to remember how to do this. That just won't happen.
This program utilizes VBScript in its macro system. What I want it to do is basically what the program already does when it backorders. I would like it to perform a check to see if the PACKLIST_ID already exists, and if it does, to add a -1, and if that already exists, make it -2, etc.
If it's a simple fix, I'll humbly ask if anyone is able to write me up something. If it isn't as simple as I think it is for someone with experience in VBScript, then let me know, and I'll withdraw my request. Let me know if you need more information.
Thanks in advance for any advice and help,
Jeff

VBScript
Started by
hypernova
, Jun 13 2012 09:58 PM
6 replies to this topic
#1
-
Posted 13 June 2012 - 09:58 PM

VBScript is a server scripting language. It should not be used for scripting in the browser.
However Internet Explorer supports VBScript. This allows us to experiment with VBScript in the browser, without the need for a web server.
However Internet Explorer supports VBScript. This allows us to experiment with VBScript in the browser, without the need for a web server.
#2
-
Posted 17 September 2012 - 06:04 AM

Marcus, Welcome to the forum and thanks for registering. VBScript and JavaScript are both actually client languages. While ASP.net and a few others allow and even rely on either one or both via the runat html attribute
VBScript and JavaScript are both heavily used by network admins (tho power shell is taking over) in log in configuration scripts. However JavaScript set itself apart by being supported by all major browsers, whereas VBScript only in IE and IE addons. Both are supported by every NT based windows and I think 98 and ME
VBScript and JavaScript are both heavily used by network admins (tho power shell is taking over) in log in configuration scripts. However JavaScript set itself apart by being supported by all major browsers, whereas VBScript only in IE and IE addons. Both are supported by every NT based windows and I think 98 and ME
#3
-
Posted 17 September 2012 - 02:46 PM

Never lose.
WIN or LEARN.
WIN or LEARN.
@Tank: looking at Marcus other posts I doubt he is an actual AutoHotkey user...
#4
-
Posted 17 September 2012 - 03:09 PM

I'm still learning the VBScript. Got some amazing help from the VBScript Tutorial site, it's super helpful, you guys should check it out!
#5
-
Posted 19 September 2012 - 10:43 AM

I've been using vbscript for a while, mostly because I work for large company that has remained using windows XP and XP doesn't have powershell built in it so it's easier to use vbscript. However if you want people to help you, you must post your vbscript on here.
#6
-
Posted 11 February 2013 - 02:26 PM

Remove the word 'server', rearrange the word 'However', and Marcus013's post is a copy\paste from the site linked to in vanhack's post.
How cool is that?
#7
-
Posted 12 February 2013 - 12:52 AM
