Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Stand alone number sequence generator?

Posted on 2009-06-27
8
Medium Priority
?
404 Views
Last Modified: 2013-11-13
Does anyone know where I may find a small stand alone application that will return the next sequential number when the programme is executed.
I can acieve this with an Excel macro, but it takes too long to keep opening Excel just for a number.
Ideally the application would copy the number to the clipboard.

This is because my colleagues who use a variety of software need a unique similarly formatted number when indexing their documents. A central file would allow them to create a unique sequential refernce.
Des
0
Comment
Question by:spar-kle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 8

Accepted Solution

by:
JIEXA earned 2000 total points
ID: 24731066
I suppose, it's on Windows. If so, create a msg.bat file with the following contents, and run it each time you need new number.
The last number resides in msg.dat file.
@echo off
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
set f=msg.dat
if not exist %f% echo 0 > %f%
for /f %%i in (%f%) do set /a v=1+%%i & echo !v! > %f%
type %f%
pause

Open in new window

0
 

Author Comment

by:spar-kle
ID: 24731268
Excellent this is exactly the kind of thing I was after, thank you
2 things...
1.Instead of displaying would it be possible to copy the number directly to the clipboard?
2.Is it also possible to prefix the number?

Thanks
Des
0
 
LVL 8

Assisted Solution

by:JIEXA
JIEXA earned 2000 total points
ID: 24731320
1. http://www.petri.co.il/software/clip.zip  (for clip.exe)
2.
replace:
  type %f%
with:
  for /f %%i in (%f%) do set v=my prefix %%i my postfix & echo !v!
or with:
  for /f %%i in (%f%) do set v=my prefix %%i my postfix & echo !v! | clip.exe

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:spar-kle
ID: 24731384
That's great, is it possible to suppress the command window?
0
 

Author Comment

by:spar-kle
ID: 24731404
..alternatively to automatically close the window
0
 
LVL 8

Assisted Solution

by:JIEXA
JIEXA earned 2000 total points
ID: 24731414
Remove the last "pause" command. The window will open and close.

I've tried to open it out of the desktop (Properties / Layout / Windows position), but it does not work for out-of-boundary.
0
 

Author Comment

by:spar-kle
ID: 24731459
Thanks Jiexa for all your help
Works perfectly
0
 

Author Closing Comment

by:spar-kle
ID: 31597550
Excellent.
Thanks for all your help
Des
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
As computers become more powerful, jobs will be replaced with artificial intelligence, leaving no place in the future for humans in the workforce. In the oncoming technological revolution, the staggering change to human mind labor will prove the ski…
Saved searches can save you time by quickly referencing commonly searched terms on any topic. Whether you are looking for questions you can answer or hoping to learn about a specific issue, a saved search can help you get the most out of your time o…
Six Sigma Control Plans
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question