0
fprintf(fptr, "#NoEnv SetWorkingDir %A_ScriptDir% CoordMode, Mouse, Window SendMode Input #SingleInstance Force SetTitleMatchMode 2 #WinActivateForce SetControlDelay 1 SetWinDelay 0 SetKeyDelay -1 SetMouseDelay -1 SetBatchLines -1 Loop { Sleep, 10 CoordMode, Pixel, Screen PixelSearch, FoundX, FoundY, 1324, 589, 1324, 589, 0x00786A, 0, RGB If ErrorLevel = 0 { Sleep, 1000 Click, 696, 728 Left, 1 Sleep, 10 Sleep, 300 Click, 775, 726 Left, 1 Sleep, 10 Sleep, 300 Click, 1273, 590 Left, 1 Sleep, 10 Return } else {  sleep, 4000 Send {f5} sleep, 3000 Click, 1324, 589, 0 sleep, 10 }} Return")"");

Here is my code, not sure if it would work for what I'm doing, but it believes that the % and other stuff in the quotations are meant to be variables or whatever, how do I make it so it ignores all of that and just prints it?

2 Answers2

4

fprintf stands for File Print Formatted.

In order to print unformatted, consider using fputs

Irad Ohayon
  • 174
  • 6
0

You need to escape the %. You can do this by writing %% instead of %.

Barmar
  • 741,623
  • 53
  • 500
  • 612
K. Sean
  • 57
  • 5