Jump to content

Modify_inc

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Modify_inc

  • Rank
    Newbie
  1. I have two .vbs files: test.vbs and scan.vbs. The two work fine when executed locally on a PC. It it when I try to execute them remotely via psexec that the scan.vbs gives me the following error on the remote PC: cscript.exe //Nologo "C:\Program Files (x86)\Common Files\Intuit\QuickBooks\scan.vbs" C:\Program Files (x86)\Common Files\Intuit\QuickBooks\scan.vbs(2, 1) (null): The system cannot find the file specified. I should note that I'm running a batch file that then executes the vbs file. Both batch files also work fine locally. Each batch file has only one command: batchs
  2. Thank you, that worked!! I had forgot about the parseInt command.
  3. Thanks for the suggestion, but I would really like to know why the format I used did not perform the calculations as intended. To add to a variable, do you not type m=m+5 or m+=5. So that whatever is already assigned to the m variable, 5 is now added to it? So if originally, m=10, m would now equal 15. What am I doing wrong? This is all of my code: (I'm learning!)// Declare variables and constantsvar cat; // categoryvar cards ; // # of cards per categoryvar type; // temp value for category typevar m = 0; // morning variablevar n = 0; // noon variablevar e = 0; // evening variable
  4. Can you tell me why this line works, but then why does it put undefined before the answer though?It's like it's trying to concatenate the variable instead of just displaying the stored value for the variable.I say that because I initialized the m variable to zero, and it displayed the Morning total as 015 (appending the zero to the total)if it helps, I am using m += cards to achieve this. Also tried m = m + cards with same results.document.write("Morning total: " + m + " Noon Total: " + n + " Evening Total: " + e);Thanks againMike
  5. k, got it thanks. Can you tell me why this line works, but then why does it put undefined before the answer though?It's like it's trying to concatenate the variable instead of just displaying the stored value for the variable(s).I say that because I initialized the m variable to 0, and it displayed Morning total: 015 (appending the zero to the total) if it helps, I am using m += cards to achieve this. Also tried m = m + cards with same results. document.write("Morning total: " + m + " Noon Total: " + n + " Evening Total: " + e + BR); Thanks againMike
  6. now why does this one exit while the condition is still true? I even initialized the variable with a letter with the same results. I also tried swapping the operator just in case I had it reversed as I did previously, but it then loops continually whether I type a character or a number. while (cards == NaN) { cards = prompt("Enter the number of cards collected for the " + cat + " batch: ",ES);}
  7. that was it, thank you very much!
  8. Can someoe please tell me what is wrong with this while statement? It will execute, but it continues even if the condition is false (which is suppose to exit the loop). I do not understand why it will not exit the loop. document.write("Welcome to Mack's Coffee Cove!"+ BR); while (cat != "morning" || cat != "noon" || cat != "evening") { cat = prompt("Enter the card category (morning, noon, evening): ",ES); } I've also tried it with 'do' at the begining and the 'while' statment at the end with same results. Is it something to do with my conditon? Mike
  9. I'm trying to understand why my username validation code is not working correctly. For the most part it works, but if you enter the username format wrong two or three times, the browser locks up and requires a forced restart of the browser. I'm a newbie at JavaScript, so keep that in mind when looking at my code. I assume it's related to a while or if statement, although I'm not experienced enough to figure it out at this point. If I enter a username with less than 8 characters, it prompts me that I must have at least 8. If I enter 8 characters with a number for the first character, it prompts
×
×
  • Create New...