Jump to content
Sign in to follow this  
dot45

help me with a syntax error

Recommended Posts

dot45

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

Share this post


Link to post
Share on other sites
OchoNueve

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]

Share this post


Link to post
Share on other sites
dot45

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

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
dot45

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.

Share this post


Link to post
Share on other sites
dot45

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.

Share this post


Link to post
Share on other sites
Jos

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  

×