Sign in to follow this  
Followers 0
dot45

help me with a syntax error

9 posts in this topic

#1 ·  Posted (edited)

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



#2 ·  Posted (edited)

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

#4 ·  Posted (edited)

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

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

or

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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

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

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

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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  
Followers 0