Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate


  • Please log in to reply
6 replies to this topic
  • Members
  • 28 posts
  • Last active: Jun 02 2009 08:28 PM
  • Joined: 12 Mar 2009
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,

  • Members
  • 5 posts
  • Last active: Sep 14 2012 10:27 AM
  • Joined: 14 Sep 2012
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.

  • Administrators
  • 4345 posts
  • AutoHotkey Foundation
  • Last active: May 02 2019 09:16 PM
  • Joined: 21 Dec 2007
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
Never lose.

  • Guests
  • Last active:
  • Joined: --
@Tank: looking at Marcus other posts I doubt he is an actual AutoHotkey user...

  • Members
  • 1 posts
  • Last active: Sep 19 2012 09:39 AM
  • Joined: 19 Sep 2012
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!

  • Members
  • 5 posts
  • Last active: Feb 14 2013 11:36 PM
  • Joined: 08 Feb 2013

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.

  • Members
  • 230 posts
  • Last active: Oct 05 2015 02:46 PM
  • Joined: 25 Dec 2012
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?