Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Formatting code
#1
I was wondering if there was some secret to what I believe is called formatting code. This runs good but it looks horrible and if I wanted to give it to someone else they would have trouble understanding the code. When I look at the code on this forum I wish that I could format code like all of you. Can someone please tell me what I am doing wrong?

Code:
Copy      Help
//;Run RegistryRepairPro 6
run "C:\Program Files\3B Software\Windows Registry Repair Pro\RegistryRepairPro.exe"
out "1"
//;^^ Run RegistryRepairPro 6 ^^
//;Start Scan Now

rep() if(IsWindowVisible(win("Information" "TMessageForm"))) break; else 0.001
out "2"    
but% child("&Scan Now" "TButton" win("Information" "TMessageForm") 0x1)
out "3"
//;^^ Start Scan Now ^^
rep 2
,//;Windows Registry Repair Pro
,//;Copy of out "10"
,rep() if(IsWindowVisible(child("Next &>>" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
,out "Rep Windows Registry Repair Pro 1"
,but% child("Next &>>" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
,out "Rep Windows Registry Repair Pro 2"
,//;^^ Windows Registry Repair Pro ^^
//;Information This license version will correct only up to 15 invalid entries after this scan.
//;Copy of out "8"

rep() if(IsWindowVisible(win("Information" "#32770"))) break; else 0.001
out "4"
but% id(2 win("Information" "#32770"))
out "5"
//;^^ Information This license version will correct only up to 15 invalid entries after this scan. ^^
//;Repair button
//;Copy of out "14" and "20" and "26"

rep() if(IsWindowVisible(child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
out "6"
but% child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
out "7"    
//;^^ Repair button ^^    
//;Information This license version will correct only up to 15 invalid entries after this scan.
//;Copy of out "4"

rep() if(IsWindowVisible(win("Information" "#32770"))) break; else 0.001
out "8"    
but% id(2 win("Information" "#32770"))
out "9"    
//;^^ Information This license version will correct only up to 15 invalid entries after this scan. ^^
//;Next
//;Copy of out "Rep Windows Registry Repair Pro 1"

rep() if(IsWindowVisible(child("Next &>>" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
out "10"
but% child("Next &>>" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
out "11"
//;^^ Next ^^    
//;Information This free trial version has corrected 15 registry errors.

rep() if(IsWindowVisible(win("Information" "TMessageForm"))) break; else 0.001
out "12"
but% child("OK" "TButton" win("Information" "TMessageForm") 0x1)
out "13"
//;^^ Information This free trial version has corrected 15 registry errors. ^^
rep
,/////////////////////////////////////////////////////////////////////
,//////////////////////////////////////////////////////////////////
,//;Repair button
,//;Copy of out "6" and "20"
,rep() if(IsWindowVisible(child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
,out "14"
,but% child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
,out "15"    
,//;^^ Repair button out "6" ^^
,//;Information licensed version will correct up to 3 registry errors.
,//;Copy of out "22"
,rep() if(IsWindowVisible(win("Information" "TMessageForm"))) break; else 0.001
,out "16"
,but% child("&No" "TButton" win("Information" "TMessageForm") 0x1)
,out "17"
,//;^^ Information licensed version will correct up to 3 registry errors. ^^
,//;Information licensed version has fixed 3 registry errors.
,//;Copy of out "24"
,rep() if(IsWindowVisible(win("Windows Registry Repair Pro" "#32770"))) break; else 0.001
,out "18"
,but% id(2 win("Windows Registry Repair Pro" "#32770"))
,out "19"    
,//;^^ Information licensed version has fixed 3 registry errors. ^^
,//;Repair
,//;Copy of out "6" and "14"
,rep() if(IsWindowVisible(child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
,out "20"
,but% child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
,out "21"
,//;^^ Repair ^^
,//;Information licensed version will correct up to 3 registry errors.
,//;Copy of out "16"
,rep() if(IsWindowVisible(win("Information" "TMessageForm"))) break; else 0.001
,out "22"
,but% child("&No" "TButton" win("Information" "TMessageForm") 0x1)
,out "23"
,//;^^ Information licensed version will correct up to 3 registry errors. ^^
,//;licensed version has fixed 3 registry errors.
,//;Copy of out "18"
,rep() if(IsWindowVisible(win("Windows Registry Repair Pro" "#32770"))) break; else 0.001
,out "24"
,but% id(2 win("Windows Registry Repair Pro" "#32770"))
,out "25"
,//;^^ licensed version has fixed 3 registry errors. ^^    
,//;Repair
,//;Copy of out "6" and "14" and "20"
,rep() if(IsWindowVisible(child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1))) break; else 0.001
,out "26"
,but% child("Repair" "TButton" win("Windows Registry Repair Pro" "TfmBase") 0x1)
,out "27"
,//;^^ Repair ^^
,
,
Thank You
#2
Hi,
Instead of just copying and pasting the code:

Highlight the code you want
Right click and chose Other Formats from the Right-Click menu and then chose copy BBCode (Forum) from the drop down list.

Then just paste that into the forum post window.

It should look right when you preview or send.

Stuart
#3
Tips: QM code in the forum (colors, functions, dialogs, etc)
#4
That is what I did . I just do not know where to put the blank lines like you would;

you would place the code like this.

Code:
Copy      Help
int i d p;str q w
i=1
d=2
p=(i+d)
w=p

q="You have "
str a.from(q w)
out a

since I do not know how to format code I would do this.

Code:
Copy      Help
int i d p;str q w
i=1
d=2
p=(i+d)
w=p
q="You have "
str a.from(q w)
out a

I would like to find out how to format code. Format code means make it look like this.

Code:
Copy      Help
int i d p;str q w
i=1
d=2
p=(i+d)
w=p

q="You have "
str a.from(q w)
out a
#5

Using window handles would clean up your code alot.

To get the handle of an item.

Use the toolbar at the top of QM> Find Window or Control.


Code:
Copy      Help
int hwnd=id(15 win("Untitled - Notepad" "Notepad"))

if(IsWindowVisible(hwnd))
,out 1
else
,end
#6
I wish that I would have thought about that. I really wish I would of. What about the code that does not format itself. Should I just do it as say if I was writing a letter and put things that are grouped together in separate paragraphs and separated by blank lines?


Forum Jump:


Users browsing this thread: 1 Guest(s)