Comatose 290 Taboo Programmer Team Colleague

Ok. Lay out some steps for me....
A
1) user clicks launch
2) program launches first checked box
3) program launches second checked box
4) program launches third checked box.
5) etc.
-----
B
1) user clicks launch
2) program launches first checked box
3) program waits for first launch to finish
4) program launches second checked box
5) program waits for second launch to finish


A or B?

Comatose 290 Taboo Programmer Team Colleague

*sigh*

Comatose 290 Taboo Programmer Team Colleague

We already established that they will only run if the box is checked..... now, what If I check ALL the boxes??? now what? Which one do I run first? Do I run them all at the same time?

Comatose 290 Taboo Programmer Team Colleague

I've never heard of the ChilkatXml object before.... I'm guessing it's a module that perhaps you installed.... you might want to check the documentation on it, I'm sure it has an option for appending data. In VB, you can open a file for appending as such:

open filename for append as #1
Comatose 290 Taboo Programmer Team Colleague

157

Comatose 290 Taboo Programmer Team Colleague

Declaring variables isn't required in VB, but it's a great practice. Part of the reason is, when you get into other languages, that are more powerful, you'll be forced to declare any variable before you can use it.... also, declaring variables provides the program with a reserve of memory for that variable. This makes your program smaller, and makes it run faster. On a simple test application, like the one we have here, it won't make a noticable difference, but in larger applications, you'll be asking yourself what the hell happened. Provided is a link to a page that will help you to optimize your VB programming, so that you can increase the speed significantly of yours apps.

Also, When you don't declare a variable, it's default type is a variant. If you read the page linked, you'll see why variants are a no, no. Basically, they are the largest, most bulky variable type in existance, and should really be treated like the Leper Variable. In fact, every time you use a variant type variable, I want you to think about how you are giving your code leprosy.

http://www.aivosto.com/vbtips/stringopt.html

Comatose 290 Taboo Programmer Team Colleague

Ok, the problem is that you declared the variable (msg) as a boolean value.... while the msgbox function returns more values than just true and false. This code works wonderfully when you change the type declaration of your variable:

Dim msg As VbMsgBoxResult

msg = MsgBox("Save this one?", vbYesNo)
 
If msg = vbYes Then
    MsgBox "true"
Else
    MsgBox "false"
End If
Comatose 290 Taboo Programmer Team Colleague

what code is there between the if blocks (where it says 'code goes here), what's actually there?

Comatose 290 Taboo Programmer Team Colleague

*Sigh* You say tomato.

Comatose 290 Taboo Programmer Team Colleague

|-153|

Comatose 290 Taboo Programmer Team Colleague

I can't give you code until I understand what you are doing. I know you want to launch more than 1 app..... what all at the same time?

Comatose 290 Taboo Programmer Team Colleague

try replacing true with vbyes.

Comatose 290 Taboo Programmer Team Colleague

149

Comatose 290 Taboo Programmer Team Colleague

I use the winblows version of it all the time.

Comatose 290 Taboo Programmer Team Colleague

The only thing I see is a button that msgbox's the text in the textbox. Help me out here, I need a layout of exactly what needs to happen. What should the right-click menu say? What should happen when it's selected? Does it need to know the filename that was clicked on? If so, why?

Comatose 290 Taboo Programmer Team Colleague

just check if the boxes are checked, and if so, run a shell on each of them. If you need the program to wait a given length of time (or until the first run is completed) you can use the waitforesingleobject api.

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

One Thirty Two

Comatose 290 Taboo Programmer Team Colleague

or don't use a button, use a timer control.

Comatose 290 Taboo Programmer Team Colleague

You should post in a new thread, and not bump old threads.

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

If it's been a real long time, it's very possible that msn closed the account, and then someone re-opened it. I know for sure that if you don't log in for a long time, MSN will deactivate the account, and then you have to manually re-activate. Also, if you look into the Msn Messenger Protocol, a little crafty programming can allow you to log in with an account you already have, and in some parts of the protocol, Masquerade as another user. In this example:

MSG bob@passport.com Bob 89\r\n
MIME-Version: 1.0\r\n
Content-Type: text/x-msmsgscontrol\r\n
TypingUser: bob@passport.com\r\n\r\n

Which is also found in the above linked reference, it would be really easy to change the parameter in the MSG command, or the typinguser command. I do a lot of network programming (with sockets), and this is not only possible, but feasible. While I'm sure this is a rarity, and most likely (in my opinion) not the culprit of your situation, it is very possible. I think that the account expired, and was re-opened with someone else....

Comatose 290 Taboo Programmer Team Colleague

123

Comatose 290 Taboo Programmer Team Colleague

Hey, Welcome to Daniweb. I'm sure your presence here is going to be a gift. So, here's a warm welcome and an out-stretched hand.

Comatose 290 Taboo Programmer Team Colleague

You should post in the virus's and nasties section to try to get rid of the virus before taking any other measures.... if those guys deem you doomed, you may want to take a look into "knoppix" (or any of the variations, such as PHLAK or STD) which is a bootable Unix OS From A CD. You put the CD in, boot to it, and it loads your system up with a unix envrionment. Knoppix can usually mount and read an NTFS (and certainly FAT) file system. Then you should be able to upload your data to a server, or if you have a floppy (assuming your data will fit) or a USB drive you can save it there.

http://www.daniweb.com/techtalkforums/forum64.html
http://www.phlak.org/modules/mydownloads/

Comatose 290 Taboo Programmer Team Colleague

Welcome

Comatose 290 Taboo Programmer Team Colleague

Your absolutely right... I didn't test the code, I went off memory. So, You would need to escape the piping symbol as such:

$myvar = "hello|world|yes!";
$myvar =~ s/\|/\t/gi;
print "$myvar";

And as for the regex optional modifier's Whoopie Do. You can add it or leave it, I don't think it really matters. I think you'll find regex to be faster in operation (not that it would be noticable on small amounts of data) than nested splits and joins, but I guess it boils down to style.

Comatose 290 Taboo Programmer Team Colleague

Cool, do me a favor and up at the top, mark the thread as solved.

Comatose 290 Taboo Programmer Team Colleague

Look up the substitution operator. s//.

You can replace the data like so:

$myvar = "hello|world|yes!";
$myvar =~ s/|/\t/gi;
print "$myvar";
Comatose 290 Taboo Programmer Team Colleague

While I agree, I still stand by my suggestion to add a button to the reply bar, that when you click it, loads a new window.... with a textbox. You paste the code into the textbox, and automagically inserts it into the post with the surrounding code tags. I know a code tag button already exists, but in it's current implimentation it's easier to just type it out.... although I suppose it would be more work than it's worth.

Comatose 290 Taboo Programmer Team Colleague

You Mean, There Are People Here Who Do NOT have a crush on Dani? :surprised

Comatose 290 Taboo Programmer Team Colleague

Opinion's are like ass..... nevermind.

Comatose 290 Taboo Programmer Team Colleague
Comatose 290 Taboo Programmer Team Colleague

VB won't run standalone either. You'd need the VB runtimes installed in order for it to work.

Comatose 290 Taboo Programmer Team Colleague

I wrote a program for people who need to quickly change the file extention of a program, on windows machines that have explorer hide the file extention. It adds a menu to any file that is right clicked, and gives you the option to select the program. Once the program is loaded, it automatically loads the filename of the program chosen. I'm guessing this is your plan, since I don't fully understand your question, but let me know if this helps.

Comatose 290 Taboo Programmer Team Colleague

oops, I forgot the slash after.... try this:

dim wsh
set wsh = createobject("WScript.Shell")
wsh.regwrite "HKCR\Folder\shell\Use Zip Help\command\", "C:\Program Files\Zip Help\Zip Help.exe " & chr(34) & "%1" & chr(34), "REG_SZ"
Comatose 290 Taboo Programmer Team Colleague

Adding it is a lot easier than deleting. Namely, because deleting usually requires that the key be empty, so that it can not contain any sub-keys or values. Adding The key/Value is pretty easy with scripting, like so:

dim wsh
set wsh = createobject("WScript.Shell")
wsh.regwrite "HKCR\Folder\shell\Use Zip Help\command", "C:\Program Files\Zip Help\Zip Help.exe " & chr(34) & "%1" & chr(34), "REG_SZ"

The deleting process however, will require you to enumerate the key you want to delete (for both sub-keys and values) delete all of those, and then delete the key in question. When I get home from work I'll post the code for enumeration and deleting.

Comatose 290 Taboo Programmer Team Colleague

Well, I see you setting the timer to false in the datagrid click event. Probably not a good idea, unless you plan to click the grid every time it loads a query result. I suggest that you add the timer1.enabled = false to the form load, after your last combo1.additem.

Comatose 290 Taboo Programmer Team Colleague

What exactly is the layout of the textfile? (post a line).

Comatose 290 Taboo Programmer Team Colleague

Right, I have a hard time thinking that loading the entire file into memory is a good idea... at least if each word is on it's own line, you can say:

open xfile for input as #1
do until eof(1)
     line input #1, tmpvar
     if tmpvar = wordinquestion then
         ' /* Word is Good (in dictionary) */
     end if
loop
close #1

Let me know what you come up with though.... it will be interesting to see how it turns out.

Comatose 290 Taboo Programmer Team Colleague

cute

Comatose 290 Taboo Programmer Team Colleague

No No, do your test for whatever word you are checking it against, within the file. I mean, it depends entirely on how big the file is.... a .txt file would need an absurd amount of words in order to be too big to load into a variable. You have to take into consideration the type machine that this will be run on. My system is extremely well equipped, and I wouldn't worry about loading all or most of the file into an array and looping through it. However, if there is a machine that it will be run on, that's less than average, or even average, loading the whole file into a variable would be really slow, and probably slow the machine down a whole lot. It may even make the program appear to be frozen; these are all things you need to take into consideration.

I would build the mini-program, just based on efficiency, and layout. It would be a lot cleaner in the spell check program (the code would be cleaner) by having each entry in the file on it's own line. Either way, you are going to have to test each word that the user has typed, against each word in the file.... if you want to load the entire file into memory, then I would do this (assuming the file is 1 long line):

open xfile for input as #1
     line input #1, tmp
     words = split(tmp, " ")
close #1

And that …

Comatose 290 Taboo Programmer Team Colleague

:eek: wow

Comatose 290 Taboo Programmer Team Colleague

two eighty two

Comatose 290 Taboo Programmer Team Colleague

Bad idea. Your best bet is to work with the file line by line. If it has no cr/lf or newline, then how are the words separated, by space? If so, I would make a mini-program to actually add a vbnewline after every word, and re-save the file, 1 word per line. It just makes it easier to work with in the spellcheck program, but if you want to deal with it with no newlines, then I suggest reading in from the file, 1 character at a time. Check if the character is space (or whatever the words are delimited by) and then that's the first word....

Comatose 290 Taboo Programmer Team Colleague

Yeah, and lets spam the masses while we're at it!

Comatose 290 Taboo Programmer Team Colleague

inc lastNumber;

Comatose 290 Taboo Programmer Team Colleague

Ghost in the machine?

MartyMcFly commented: :) +2
Comatose 290 Taboo Programmer Team Colleague

:eek:

In fact,
*Looks At Narue*
We are running out of people to help us add code tags ....

Comatose 290 Taboo Programmer Team Colleague

Pft, Code can solve all of our problems.