Jump to content

help me with a syntax error


Recommended Posts

RunWait(@ComSpec & " /c" "rundll32 printui.dll, PrintUIEntry /dl /n " & $aPrinters &)

What is the proper syntax for the above code?

There is supposed to be a space after the n.

example:

RunWait(@ComSpec & " /c" "rundll32 printui.dll, PrintUIEntry /dl /n " "dog")

if $aPrinters=dog

Edited by dot45
Link to comment
Share on other sites

RunWait(@ComSpec & " /c" "rundll32 printui.dll, PrintUIEntry /dl /n " & $aPrinters &)

What is the proper syntax for the above code?

example:

RunWait(@ComSpec & " /c" "rundll32 printui.dll, PrintUIEntry /dl /n " "dog")

if $aPrinters=dog

Try this:

RunWait(@ComSpec & "/c rundll32 printui.dll, PrintUIEntry /dl /n " & $aPrinters)

EDIT: syntax

Edited by OchoNueve
[font="Times New Roman"]Ocho.[/font]
Link to comment
Share on other sites

Try this:

RunWait(@ComSpec & "/c" "rundll32 printui.dll, PrintUIEntry /dl /n " & $aPrinters)

C:\Documents and Settings\116134\Desktop\print_migration_v7.au3(201,72) : ERROR: syntax error

RunWait(@ComSpec & " /c" "rundll32 printui.dll, PrintUIEntry /dl /n "

error after the last qoute.

Edited by dot45
Link to comment
Share on other sites

  • Developers

RunWait(@ComSpec & " /c " & "rundll32 printui.dll, PrintUIEntry /dl /n "

or

RunWait(@ComSpec & " /c rundll32 printui.dll, PrintUIEntry /dl /n "

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Maybe:

$aPrinters = "dog"
RunWait(@ComSpec & " /c " & "rundll32 printui.dll, PrintUIEntry /dl /n " & $aPrinters)

This doesnt throw any compile errors, thanks.

I'll compile and report back if it works.

Link to comment
Share on other sites

RunWait(@ComSpec & " /c " & "rundll32 printui.dll, PrintUIEntry /dl /n "

or

RunWait(@ComSpec & " /c rundll32 printui.dll, PrintUIEntry /dl /n "

My issue is with the variable that I am trying to include at the end of the line.

Link to comment
Share on other sites

  • Developers

My issue is with the variable that I am trying to include at the end of the line.

I was merely pointing out the code error ... saw that Zedna gave the complete answer already after i posted.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I was merely pointing out the code error ... saw that Zedna gave the complete answer already after i posted.

Jos

Thanks, I got that line of code working, now for the fun of my first array. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...