Jump to content

Recommended Posts

I know very little about VB but I know a whole lot about PHP.  So figuring out coding comes easily .. sorta ...but I need someone to help me out.  My job has a warehouse full of bins .. over 14 thousand that need to be deleted in the system.  Of course the only way they are showing me to delete it is one by one.  I rather not....

 

Since I know a little about computers, I see that the program I am using has macros.  So I created a macro to help out a little with deletion, which looks like this:

 

[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)

REM This line calls the macro subroutine
subSub1_

sub subSub1_()
   autECLSession.autECLOIA.WaitForAppAvailable
   
   autECLSession.autECLOIA.WaitForInputReady
   autECLSession.autECLPS.SendKeys "1ul02"
end sub

 

That only writes part of the bin to be deleted.  I would type the rest which would look like this in full:

 

1ul02012

 

The question is:  Can someone help me write a script where it automatically hits enter and adds +1 to the last digit (but only reoccurs 6 times)

 

For instance...  I would like to be able to enter this bin into my system: 1UL0212 and I start the macro...

 

The macro then...

 

"Hits enter"

 

calculates 1UL0212 + 1 and inputs 1UL0213 then hits enter

 

calculates 1UL0213 + 1 and inputs 1UL0214 then hits enter

 

calculates 1UL0214 + 1 and inputs 1UL0215 then hits enter

 

calculates 1UL0215 + 1 and inputs 1UL0216 then hits enter

 

.... so on until it reaches 1UL0218 and hits enter then stop

 

Then I would move to next set of bins where I type 1UL0312 and I start macro

 

The macro then...

 

"Hits enter"

 

calculates 1UL0312 + 1 and inputs 1UL0313 then hits enter

 

calculates 1UL0313 + 1 and inputs 1UL0314 then hits enter

 

calculates 1UL0314 + 1 and inputs 1UL0315 then hits enter

 

calculates 1UL0315 + 1 and inputs 1UL0316 then hits enter

 

.... so on until it reaches 1UL0318 and hits enter then stop

 

----------------

 

I don't know a better way to explain this?  Sorry for long post ... any help would suffice

 

Thanks

Darrel

 

Link to comment
https://forums.phpfreaks.com/topic/226809-vb-coding-help-addition/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.