Jump to content
Doctor

Several useful functions in SCAR, tried looking (but no luck)

Recommended Posts

I have several. The script I am writing pertains to Windows itself, and no games. The script will be used to automatically open a program from a directory and click buttons within the window. The script will need to be portable (includes must travel with it or be built in to the script)

 

1. How do I open a folder? All I could find here is how to execute a program. By the way, it didn't work in Windows 7 :(

(Source: http://forums.scar-divi.com/showthread.php?1342-ExecProg-dll-Open-a-program-with-SCAR-Divi)

 

2. What would be the best way to read text (on a button) from Windows XP, Windows 7, Windows Vista (and all possible display settings)? Would I have to use tolerance, or would I have to make a procedure/function for each one and have it go through each one? OR could I get the version of windows+theme from a function and immediately run the correct procedure corresponding to it?

 

3. What would be the best way to open a flash drive with a specific label? Would I have to navigate to My Computer, or could I get it to use lower level functions to directly open the folder?

 

4. Can SCAR do things like grab a list of all open windows, like Task Manager? Say the program was running, but it got minimized. Or better yet, just have it launch task manager itself and re-maximize the program.

 

5. How can I get the correct %currentuser%/Desktop to work? I would like to copy both the program and script to the computer and let it open the folder right from the same folder or directory.

Can SCAR use the %currentuser% variable? I just want to be able to open the current user's desktop without the need for mouse movement.

 

Keep in mind that I am neither a noob to programming or SCAR, I'm just a little rusty since the last time I used it was in 2007. Good times, cutting those Draynor willows ;)

 

Thanks guys!

Edited by Doctor
Added Task Manager info
Link to comment
Share on other sites

Welcome back!

 

There is several things you want to be able to do. Probably some of those that you can't do in SCAR. My bad on that link you posted, try including this and playing with it - Shellutils.dll

 

1. There is a portable SCAR, and regular SCAR downloadable from this website here.

2. You can open the program using shellutils.dll's functions, but remember that the path MUST BE RELATIVE, because if you want this portable, and you put it on another computer. If it had an exact path like Run('C:\Documents and Settings\Stupid\ScarScript.scar'); It wouldn't work on some other computer. You could do like Run('Bob.exe'); (if it was in same folder as script).

3. You can open/read/write to files with SCAR Divi. Opening folders though, I mean you could list all the files in that folder using SCAR. Here is the Documentation for SCAR's file functions (including folders too a little) - here.

 

4. Text Reading...okay this might be the hardest part. You could just make sure each Windows is set to like a Windows Classic setting. I mean you could make it so it could go with different scenarios. Like you could activate the window (bring it up) using SCAR then look for the colors of the Window appearances. Possibly making a TPA. You have to remember that each Computer can have a different resolution set that might affect the size of components on the program, and the design. We need more OCR functionality in SCAR but we got some things.

 

GetTextAT, IsTextAt - here use CTRL + F (Find in page) then type in one of those. Basically those use a Font (Your own or the computers) and reads the text/tells you if text is there. We need more documentation on it.

 

I would suggest just using finding methods/static methods because Is this program Dynamic? Is it going to change really?

 

5. I don't believe SCAR can just open a File explorer for the flash drive you want like that. AFAIK

 

6. Once again SCAR cannot do this. BUT you could use SCAR to open Task Manager.

 

7. Well in order to get everything portable you have to use relative paths. For instance here's some examples:

 

[sCAR]

'..\Folder' // That ..\ is saying parent folder, then folder.

'Folder\AnotherFolder\' \\ Lets say your Script was inside Folder then the path would just be 'AnotherFolder'

[/sCAR]

 

You just gotta play around with that. Welcome back,

 

~LordJashin

Edited by LordJashin
Link to comment
Share on other sites

OK, thanks. Those will be helpful. I ran into a speedbump:

 

Instead of text, I decided to use bitmaps. So, I've been importing bitmaps and the program successfully moves the mouse to it and clicks on it... however, those are for programs with specific buttons (they do not change across Windows versions or themes)

 

I need to click the 'Start' button on several versions of windows. Start is always on the bottom left. The problem is, the resolution is always different. How can I get the height of the screen and just click the mouse at the coords (0, height)?

 

(Incase anyone is wondering, I decided to just navigate to Computer and bitmap search for my specific flash drive icon to get to my programs)

Link to comment
Share on other sites

OK, thanks. Those will be helpful. I ran into a speedbump:

 

Instead of text, I decided to use bitmaps. So, I've been importing bitmaps and the program successfully moves the mouse to it and clicks on it... however, those are for programs with specific buttons (they do not change across Windows versions or themes)

 

I need to click the 'Start' button on several versions of windows. Start is always on the bottom left. The problem is, the resolution is always different. How can I get the height of the screen and just click the mouse at the coords (0, height)?

 

(Incase anyone is wondering, I decided to just navigate to Computer and bitmap search for my specific flash drive icon to get to my programs)

 

To get the dimensions of the screen just do the following:

[sCAR]

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

WriteLn(w);

WriteLn(h);

end.

[/sCAR]

 

Also to open the "Start" menu you can use the Windows key on your keyboard.

Link to comment
Share on other sites

Hey Doctor, you can always suggest new features/commands to Freddy @MantisBT. ..of course everything wont be added in SCAR [obvious], but I would say a good amount, of best ideas, have a great chance of being added to SCAR some day in the future. :)

 

-Jani

 

P.S. Remember to check out what has been suggested already..

Link to comment
Share on other sites

Thank you both, especially for that dimension detector.... Now I realize I already did the work with importing some Start button bitmaps... could I potentially use them to detect the version of Windows that I'm running, or is there a function for that too?

 

And again... THANKS! :D I hope this thread can help anyone in the future, whether it be a Google search or a search of this forum.

 

So to make this a function, I could return the Width/Height/Both(array?) dimension:

 

 

[sCAR]Function GetResW : Integer;

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

 

GetResW := w

 

end;[/sCAR]

 

(I think SCAR is different than Pascal, because it says 'Identifier Expected' when I add it to my script.

Edit: I think it needs an input. I'll make lemonade out of lemons and make it a boolean that determines width or height.

 

Edit: Fixed! Here it is:

 

[sCAR]Function GetResWH(isWidth : boolean) : Integer; //true: width, false: height

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

if(isWidth) then begin

Result := w end

else begin

Result := h;

end;

end;[/scar]

 

 

 

 

 

 

 

Procedures are easy, but Pascal has the some of the weirdest return methods when compared to C++, PHP, or Basic. This helped me with function returns: http://www.hkbu.edu.hk/~bba_ism/ISM2110/pas046.htm

 

Edit: I think I found a BUG in SCAR! When I call MouseToBitmap in a script, it will find it and click on it and the script will end. But if I call it again the second time, the mouse will move to the same spot that the bitmap was during the first run!

 

[sCAR]procedure MouseToBitmap(bitmap: Integer); //Move the mouse to the center of a bitmap

var

x, y, w, h: Integer;

begin

if(findbitmap(bitmap, x, y)) then begin

Writeln('Found... moving mouse.');

GetBitmapSize(bitmap,w,h);

x := x + (w div 2);

y := y + (h div 2);

Mouse(x,y);

end

else begin

Writeln('Bitmap not found!');

end;

end;[/sCAR]

 

I believe it would have something to do with SCAR retaining the previous run's screenshots and not taking new ones. This bug is fatal for my work I will be doing. Whether it be mine or SCAR's, I want to know how to avoid it or fix it if possible. I imagine a forced re-scan of the screen would be a good workaround. Anyone know of one?

Edited by Doctor
Link to comment
Share on other sites

Thank you both, especially for that dimension detector.... Now I realize I already did the work with importing some Start button bitmaps... could I potentially use them to detect the version of Windows that I'm running, or is there a function for that too?

 

And again... THANKS! :D I hope this thread can help anyone in the future, whether it be a Google search or a search of this forum.

 

So to make this a function, I could return the Width/Height/Both(array?) dimension:

 

 

[sCAR]Function GetResW : Integer;

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

 

GetResW := w

 

end;[/sCAR]

 

(I think SCAR is different than Pascal, because it says 'Identifier Expected' when I add it to my script.

Edit: I think it needs an input. I'll make lemonade out of lemons and make it a boolean that determines width or height.

 

Edit: Fixed! Here it is:

 

[sCAR]Function GetResWH(isWidth : boolean) : Integer; //true: width, false: height

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

if(isWidth) then begin

Result := w end

else begin

Result := h;

end;

end;[/scar]

 

 

 

 

 

 

 

Procedures are easy, but Pascal has the some of the weirdest return methods when compared to C++, PHP, or Basic. This helped me with function returns: http://www.hkbu.edu.hk/~bba_ism/ISM2110/pas046.htm

 

Edit: I think I found a BUG in SCAR! When I call MouseToBitmap in a script, it will find it and click on it and the script will end. But if I call it again the second time, the mouse will move to the same spot that the bitmap was during the first run!

 

[sCAR]procedure MouseToBitmap(bitmap: Integer); //Move the mouse to the center of a bitmap

var

x, y, w, h: Integer;

begin

if(findbitmap(bitmap, x, y)) then begin

Writeln('Found... moving mouse.');

GetBitmapSize(bitmap,w,h);

x := x + (w div 2);

y := y + (h div 2);

Mouse(x,y);

end

else begin

Writeln('Bitmap not found!');

end;

end;[/sCAR]

 

I believe it would have something to do with SCAR retaining the previous run's screenshots and not taking new ones. This bug is fatal for my work I will be doing. Whether it be mine or SCAR's, I want to know how to avoid it or fix it if possible. I imagine a forced re-scan of the screen would be a good workaround. Anyone know of one?

 

This is not a SCAR problem, SCAR works perfectly. You just need to get used to the Pascal Scripting engine. Functions/Procedures do not retain the previous runs information. SCAR when you run like: A FindBitmap function, it will find the FIRST instance of that bitmap on the screen. Its not going to return anything after that. Then it will return the values.

 

Anyway you just need to learn how "Delphi" scripting works. Infact Microsoft has bought out some of the Delphi patent rights for big money, and USE some of the same ways as Delphi. Especially with Visual Basic. If you've programmed in both enough you would notice.(findbitmap(bitmap, x, y)) that looks for the bitmap INSIDE the Client you set, it will find the first instance (always). Now if you were to change it then maybe it would find the second instance.

 

Identifier expected is an compiler error because you did not use Result variable. Anyway just get up to speed, maybe look at some scripts in the scripts section.

 

Your Bitmap function: SCAR found the first instance of the bitmap on the screen, moved the mouse there. It doesn't know that you only want to search and move mouse to the next bitmap. It is just going through the commands you put in that procedure.

Link to comment
Share on other sites

I fixed my other issues with some work with function tutorials, but the bitmap procedure is still giving me trouble. My issue is not with finding a second instance of the bitmap, because there will always be only one for the software I will be using it with. My issue is that SCAR does not refresh unless I close it and open it again, otherwise it goes right back to the same empty spot where the bitmap was the first time I ran the script.

Link to comment
Share on other sites

I fixed my other issues with some work with function tutorials, but the bitmap procedure is still giving me trouble. My issue is not with finding a second instance of the bitmap, because there will always be only one for the software I will be using it with. My issue is that SCAR does not refresh unless I close it and open it again, otherwise it goes right back to the same empty spot where the bitmap was the first time I ran the script.

 

Post your bitmap string. The problem is something in your code. If you would post your code this process would be 100X easier for you and me and everyone else trying to help you.

Link to comment
Share on other sites

[sCAR]

Function MouseToBitmap(bitmap: Integer): Integer; //Move the mouse to the center of a bitmap

var

x, y, w, h: Integer;

begin

if(findbitmap(bitmap, x, y)) then begin

Writeln('Found... moving mouse.');

GetBitmapSize(bitmap,w,h);

x := x + (w div 2);

y := y + (h div 2);

Mouse(x,y);

result := 1;

end

else begin

Writeln('Bitmap not found!');

Result := 0;

end;

end;

 

procedure Mouse(x,y: Integer);

begin

MoveWindMouseEx(x,y,0,0,12);

end;

 

procedure Click; //getpos, click

var

x, y: Integer;

begin

Sleep(10);

GetMousePos(x, y);

ClickMouse(x, y, True);

end;

 

procedure MouseToStart;

begin

Mouse(18,GetResWH(false)-11);

end;

 

 

Function GetResWH(isWidth : boolean) : Integer; //true: width, false: height

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

if(isWidth) then begin

Result := w end

else begin

Result := h;

end;

end;

 

[/sCAR]

 

I'm pretty sure the problem is somewhere in my code, but I just wish I could more easily find it. By no means am I trying to blame SCAR, I love it but I just find it strange when the exact same program executes differently from run to run.

 

It's the strangest thing ever. If I tell it to MouseToBitmap to a single bitmap, it moves to it every time! However, if I call MouseToBitmap, a few sleeps, and a MouseToStart, it stops properly tracking the bitmaps when I run it. It has to be some sort of memory-saving feature. I know this shouldn't be how SCAR works, because it is not properly re-scanning the screen to see where the bitmap has moved to. Let me know if you need more code. Right now I just view the bitmaps in Photo Viewer and move them around the screen to see if it tracks properly when I run the script a second time.

 

Here are some bitmap strings:

 

[sCAR]

 

win7_start_aero := BitmapFromString(18, 16, 'ceNoBYAOf/' +

'MNMKs5UI9dnKdx3K+CELOKNLeSTLeSULOiPMVZrd4iqcJ3CT5C5R' +

'4GrS3CYVWCKV1aGUEaDQ8xTJdZkKN15K+GJLeWXLuihLumnLuqrL' +

'NCPQ0ZpeqfIdKrKYqLEVpa+SoSyRm+lRlyaRUyRQ9FcJtxzKuCHL' +

'OWYLumnLuyyLe24Le+9K5Z8WlJ1eLrUgLXPc6zKZaHEVpO8SX+uR' +

'2qhR1aVQ9ZlKN+BLOaWLuqpLu66Lu/DLe/GK/PDLVhpbnWWfMbaj' +

'L3TgLXOcqnIYZ3BUIq1R3SmR12aQ91kIrloNp5pRp5qRL93MOykI' +

'PPTJuW1NiRaeKTDi8zdlsPXibrSfK/LaqPFWJO7SXyrR2WeRSNPc' +

'B1WfSJdhSJfhBVUeyNTdYxnQ514SCRfdsvgnc/fmsjaj7/Ug7TOc' +

'qjHXpi/TIKwR2qiRiCPyk6r4G+55ovL8ZfT8nawzyxojg5biEiBe' +

'NXko9jlosrclMHWh7bPdanJYZvAToe0RnOoSi+d0lyp2Hq34JjI6' +

'LHW7r/f8sDn+xpqlBVihjx8bp7Ag8fbk8fairzTeazLY5a/UG2lS' +

'UF9UCqb0Ven13a035LE5qzU7b7e8o7B4iRqhb69kzRzixZigyhtd' +

'0J/b0iDajl3ZiVkaiFabRZWcyCYz0yk1Wyw3Ia+45/N6rTa81WSs' +

'0t5dP3qq//pqr28knSQhEt5fkh1eGR9a5GKVtebMXuJaxWTzDmf0' +

'12p2Xa134zC5ZzN8jB1lJadZvjnsPbiovfflfvcgv/YbP/VUf/QM' +

'/7CJuyoGjx0hRGNyCCYz0ai1WKr2Xe233Sx4yFujt/Ga/fhmvfdj' +

'PjagPnXcfvVXPzSP/zJLPq3Jb+ZNxZmkROGwxORyyWa0Eai1F2r2' +

'0qQvzF3hv/acvnZfPnYdfrWafvUWvvSQ/zMLvm+KfSqHoeMYwlnn' +

'RB9ug6FwRGQyyCZ0TWg2S98oHGPaf7YZPrVX/rUWfvTTfzRPPzLL' +

'vq/KPexJ+2fGVJ+gwtwqQxqnglsoQZvpwiAvBiU1iJ4mb6wSf3UQ' +

'vzSPfvQOPzNMPvHKvm8KPaxJvSlItGWKCZ0mQ52sg6FvwyHwQyEu' +

'gx6rhR7sSmAmP/IK/zGKfvFKvrCKfm9KPe1J/SsJfKjIvGYG6SOS' +

'BFypxB6tt524fE='); //plain 7 start button

 

 

win7_start_clas := BitmapFromString(41, 12, 'ceNo7r8N+x' +

'4XzUSLP0xK+dzVcO9sSOlZEN23Smb4xfcaa8qZZ6WF19jWdWVcun' +

'KA6uuXE9SSb93kf/8tFAu8WC+5Z3Tf3YOSEvfplqySjJ4nalolbF' +

'CpNmNhKC6tfRrC+aWJ/t4jt/WH2p7stDh5YuuFK7OKT3r27dQuWS' +

'gR0inuXGu7ZsRGqfkogAxIwKF1z5UJ/KIgZOJ0ES6FaNvSU71w+/' +

'dSWuQ82xj3eX37kwsIDd3PXX4ieedC2Zr1s3AzJlCr/S+eOIewN6' +

'cdqDhlWJ8890Lbr2vrLTy9eu33t4smNx5v33snfejV2/nHHxq2yC' +

'XOku/rrIFq2lerCfIowZ3oIcjAETt9caIAeLCeuQAT1CreBHB8YC' +

'tMSM+dQx/ZL6y8+OvDw463rx29c3HLq/PpNR/pnbynrX5w9dVrJo' +

'f07cIc2Hl+vKdcDiuuWb4ZbrWsAVQnVEjh5d8Xa07OP3Np/7fGLO' +

'+t/v5jw8e6MJxen3TlS/WSbz5mFEdDQRgkrGAAFPrrVkMCBASSrE' +

'WqgWhzatsTPOVi5/vyBs+fe3+r5+qj8272EXzdt/l+W+L+Xc8OsI' +

'uzxBQ9DVKuRIwUcF8i+BipGsVqvZK1tx87QGccOH97y80bAz9uev' +

'25Y/r6k8Hsv/49lwuuWz8JuNSLJoVgNiXqw1ZgBjm71rHnzK3rnx' +

'XRuPLWn8/9Vqd8X5H6fFPu5g//vQtZbU7QP7duOI0Uh0htSCMPjE' +

'WSpAU6roVog7DMnDx5eU/FjI+f/zRz/V7L/n8PyfyLT2vaQlcsWn' +

'D99mBblCTK6fP74jvULN03P2dwTuLorduHkOmBJArQXKE4jGwGez' +

'195'); //7 classic (and safe mode)

 

win7_start_safe := BitmapFromString(34, 11, 'ceNq748L5K' +

'JHnaQnfuxquo5MLJmxMa9miv3h/xYp9vRNWVcW2enTPqv9KMXiSz' +

'fu8j//lIoF3iwXP7F2y4GjchL36ZaskoyeJ2paJWxQqLV25iHJb3' +

'jSxv1vE9v4w+8v9tpcu79lwJXbxSe/e3boFSyUCOsV9K0xu3rwJU' +

'XlmKgMcTD0DFHi0ORfKIgQendy59taxzS93Z7093Xr+7oYDd3PXX' +

'4ieedC2Zr1s3AzJ3JaYz58/w+2AGvlo8+YzaEL4wZnOvbe23nr74' +

'Pn7jx/e7bzQt/dO/tarsfOPOzZulU2YIz1n8XSoa0DuRjYSIgDzG' +

'SoP1ee5ubkMHdsvrb/46MDDj+/ePX717Oyth0d3n5u9eG/jzHWVi' +

'5e1P3jwAMNUuFXY/AIXAzNyNz+CiFasPT37yK2jd998ebn/94sJP' +

'58t/nBv2YuL3a/3hV1Zlfzp0yfk4EW1Cc0WJNcDDUeRPBM/52Dl+' +

'vNnb9///nj610fl3+4l/Lpp8/+yxP+9nHtXtmCLSXjYIQyCiMENx' +

'7TFtmNn6Ixjl6+e+n0r6Odtz183LH9fUvi9l//HMuEjB3YgmT0V5' +

'nt4UKCxQEaiWQe3pW3uxuQJu26cmfv/qtTvC3K/T4r93MH/dyHrn' +

'el69+/fxxrZcM0wQUTsg2Iaiy0g8PrNm0t7e39s5Py/meP/Svb/c' +

'1j+T2TaPjnp8OEj79+//0oNAAAt9wqB');

 

[/sCAR]

Edited by Doctor
Link to comment
Share on other sites

You need to make sure you put WAITS between what you do. For instance. When you first activate a client (focus it), wait like 2 seconds then start searching for bitmaps on it. If the BITMAP on the screen is covered you are not going to find it. Also if the mouse is in the way in might not find it, so make sure to move the mouse. You should try using FindBitmapTolerance, so if it can't find it, it will have more of a chance to find it if set right.

 

YOU NEED TO FREE YOUR BITMAPS AFTER USING THEM

 

[sCAR]

FreeBitmap(bmp);

[/sCAR]

 

Here Cleaned up your functions/procedures a bit:

 

[sCAR]

procedure Mouse(x, y: Integer);

begin

MoveWindMouseEx(x, y, 0, 0, 12);

end;

 

function MouseToBitmap(bitmap: Integer): Integer; //Move the mouse to the center of a bitmap

var

x, y, w, h: Integer;

begin

Result := 0;

if findBitmap(bitmap, x, y) then

begin

Writeln('Found... moving mouse.');

GetBitmapSize(bitmap, w, h);

x := x + (w div 2);

y := y + (h div 2);

Mouse(x, y);

Result := 1;

end

else

Writeln('Bitmap not found!');

end;

 

procedure Click; //getpos, click

var

x, y: Integer;

begin

Sleep(10);

GetMousePos(x, y);

ClickMouse(x, y, True);

end;

 

function GetResWH(isWidth : Boolean) : Integer; //true: width, false: height

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

if isWidth then

Result := w

else

Result := h;

end;

 

procedure MouseToStart;

begin

Mouse(18, GetResWH(false) - 11);

end;

[/sCAR]

Link to comment
Share on other sites

I have a question about one of your functions, your setting the desktop as the client in GetResWH, are you using the desktop as your client? If you are actually selecting a client then selecting the desktop, the client is now looking around the whole desktop and not just your client you had selected. You need to store the window handle of the client that was selected then set the client back to the stored window handle after you finished your search.

 

 

Also setting the desktop as client in that function seems silly because it obviously is going to be called more than once because you have different parms so why would you need to keep setting the desktop as the client over and over? Its more of a logic issue. =p

Link to comment
Share on other sites

You can call the start Key Directly on Any windows with

 

[scar]Sendkey(92);[/scar]

 

OR

 

[scar]Keydown(92)

wait(40)

Keyup(92);[/scar]

 

That will free up the need for the start button bitmaps.

 

I'd also recommend a procedure to set the window up in the same place on every version of windows.

 

another thing is to be sure to turn off the font smoothing/cleartype functions on your windows. 7Aero and Vista have entirely different smoothing procedures that will make your bitmaps useless in some cases.

 

 

I also wrote a script that can help with change window functions(Alt+Tab, Print Screen Only of selected Window) and some multi-key commands. Here is the rough if you can use it.

 

[scar]

//Nemolorn 6/12/12

Procedure NLSHK(ctrl,alt,shift,winkey,command:string); // All values must be entered as a string 'True' or value

begin

IF Uppercase(ctrl) = 'TRUE' then

Keydown(17) else ctrl := '';

IF Uppercase(alt) = 'TRUE' then

Keydown(18) else alt := '';

IF Uppercase(shift) = 'TRUE' then

Keydown(16) else shift := '';

IF Uppercase(winkey) = 'TRUE' then

Keydown(92) else winkey := '';

command := Uppercase(command)

IF Length(Command) = 1 Then

Keydown(strget(Command,1))

Else IF StrtoInt(GetLetters(Command)) > 1 Then

Case command of

'BACKSPACE' :Keydown(8);

'TAB' :Keydown(9);

'ENTER' :Keydown(13);

'SHIFT' :Keydown(16);

'ALT' :Keyup(18);

'CAPS LOCK' :Keydown(20);

'CAPS' :Keydown(20);

'CAPSLOCK' :Keydown(20);

'ESC' :Keydown(27);

'SPACEBAR' :Keydown(32);

'SPACE' :Keydown(32);

'PAGE UP' :Keydown(33);

'PAGEUP' :Keydown(33);

'PG UP' :Keydown(33);

'PGUP' :Keydown(33);

'PAGE DOWN' :Keydown(34);

'PAGEDOWN' :Keydown(34);

'PG DOWN' :Keydown(34);

'PGDOWN' :Keydown(34);

'END' :Keydown(35);

'HOME' :Keydown(36);

'LEFT' :Keydown(37);

'UP' :Keydown(38);

'RIGHT' :Keydown(39);

'DOWN' :Keydown(40);

'PRINTSCREEN' :Keydown(44);

'PRTSCRN' :Keydown(44);

'PRINT SCREEN' :Keydown(44);

'PRT SCR' :Keydown(44);

'INSERT' :Keydown(45);

'COPY' : Keydown(67);

'PASTE' : Keydown(86);

'CUT' :Keydown(88);

'WINDOWS' :Keydown(92);

'START' :Keydown(92);

'UNDO' :Keydown(90);

'F1' :Keydown(112);

'F2' :Keydown(113);

'F3' :Keydown(114);

'F4' :Keydown(115);

'F5' :Keydown(116);

'F6' :Keydown(117);

'F10' :Keydown(121);

'NUMLOCK' :Keydown(144);

'NUM LOCK' :Keydown(144);

'NUM' :Keydown(144);

end

Else IF Length(Command) <1 Then

Writeln('Fatal Error');

wait(40)

IF Uppercase(ctrl) = 'TRUE' then

begin

Keyup(17)

ctrl := 'ctrl'

end else;

IF Uppercase(alt) = 'TRUE' then

begin

Keyup(18)

alt := 'alt'

end else;

IF Uppercase(shift) = 'TRUE' then

begin

Keyup(16)

shift := 'shift'

end else;

IF Uppercase(winkey) = 'TRUE' then

begin

Keyup(92)

winkey := 'winkey'

end else;

IF Length(Command) = 1 Then

Keyup(strget(Command,1))

Else IF StrtoInt(GetLetters(Command)) > 1 Then

Case command of

'BACKSPACE' :Keyup(8);

'TAB' :Keyup(9);

'ENTER' :Keyup(13);

'SHIFT' :Keyup(16);

'ALT' :Keyup(18);

'CAPS LOCK' :Keyup(20);

'CAPS' :Keyup(20);

'CAPSLOCK' :Keyup(20);

'ESC' :Keyup(27);

'SPACEBAR' :Keyup(32);

'SPACE' :Keyup(32);

'PAGE UP' :Keyup(33);

'PAGEUP' :Keyup(33);

'PG UP' :Keyup(33);

'PGUP' :Keyup(33);

'PAGE DOWN' :Keyup(34);

'PAGEDOWN' :Keyup(34);

'PG DOWN' :Keyup(34);

'PGDOWN' :Keyup(34);

'END' :Keyup(35);

'HOME' :Keyup(36);

'LEFT' :Keyup(37);

'UP' :Keyup(38);

'RIGHT' :Keyup(39);

'DOWN' :Keyup(40);

'PRINTSCREEN' :Keyup(44);

'PRTSCRN' :Keyup(44);

'PRINT SCREEN' :Keyup(44);

'PRT SCR' :Keyup(44);

'INSERT' :Keyup(45);

'COPY' : Keyup(67);

'PASTE' : Keyup(86);

'CUT' :Keyup(88);

'WINDOWS' :Keyup(92);

'START' :Keyup(92);

'UNDO' :Keyup(90);

'F1' :Keyup(112);

'F2' :Keyup(113);

'F3' :Keyup(114);

'F4' :Keyup(115);

'F5' :Keyup(116);

'F6' :Keyup(117);

'F10' :Keyup(121);

'NUMLOCK' :Keyup(144);

'NUM LOCK' :Keyup(144);

'NUM' :Keyup(144);

end

Else IF Length(Command) <1 Then

Writeln('Fatal Error');

Writeln(ctrl+alt+shift+winkey+command)

end;[/scar]

Edited by nemolorn
Link to comment
Share on other sites

Well usually the title bar on Windows, is always in the same place.

 

Interesting, but if you are going to automate windows focus on one OS at a time. You can actually detect what Windows Operating System is being used with SCAR. Just do:

 

You can do CTRL + Space in SCAR, then type in "os" and it will show the possible values for Operating System. Of the (TOpSys type).

[sCAR]

if Operating System = osWinXP then

// Do stuff

[/sCAR]

Link to comment
Share on other sites

Thank you all, the feedback has helped me get over my first major roadblocks. Here's what I have so far (also, I have found Windows Hotkey to be helpful for things like opening My Computer and Run). This is more of a tech demo than anything, since I haven't inserted any real work processes yet, mostly just underlying functions and tools to make the script versatile and recyclable as possible.

 

[sCAR]

program WinBot;

 

 

Function GetResWH(isWidth : boolean) : Integer; //true: width, false: height

var

w, h: Integer;

begin

SetDesktopAsClient;

GetClientDimensions(w, h);

if(isWidth) then begin

Result := w end

else begin

Result := h;

end;

end;

 

 

procedure BotInit;

var

wid, hig: Integer;

 

begin

 

wid := GetResWH(true);

hig := GetResWH(false);

 

DisguiseClient('CleanerBot');

WriteLn('////////////////////////////////////////');

WriteLn('////////-------Starting!-------/////////');

WriteLn('////////--Let go of the mouse--/////////');

Writeln(Format('//////// Resolution: %d x %d/////////', [wid,hig]));

WriteLn('////////////////////////////////////////');

 

Sleep(1500);

//minimize myself

end;

 

 

 

procedure Mouse(x,y: Integer);

begin

MoveWindMouseEx(x,y,0,0,12);

end;

 

procedure Click; //getpos, click

var

x, y: Integer;

begin

Sleep(10);

GetMousePos(x, y);

ClickMouse(x, y, True);

end;

 

procedure ClickClick;

begin

Click; Sleep(50); Click;

end;

 

procedure PressEnter;

begin

Sleep(100);

KeyDown(13); //Press Enter

Sleep(25);

KeyUp(13);

// Sleep(200); //not needed, messes up reactions that are needed immediately

end;

 

Function MouseToBitmap(bitmap: Integer): Integer; //Move the mouse to the center of a bitmap

var

x, y, w, h: Integer;

begin

if(findbitmap(bitmap, x, y)) then begin

Writeln('Found... moving mouse.');

GetBitmapSize(bitmap,w,h);

x := x + (w div 2);

y := y + (h div 2);

Mouse(x,y);

sleep(50);

// if click = true then

// end;

FreeBitmap(bitmap);

result := 1;

end

else begin

Writeln('Bitmap not found!');

sleep(50);

FreeBitmap(bitmap);

sleep(10);

Result := 0;

end;

end;

 

procedure MouseToStart;

begin

Mouse(18,GetResWH(false)-11);

end;

 

 

procedure TypeKeys(); //possibly irrelevant

begin

//gdfg

end;

 

 

procedure OpenMyComputer;

begin

sleep(5);

KeyDown(92);

sleep(5);

KeyDown(69);

sleep(5);

KeyUp(92);

sleep(5);

KeyUp(69);

sleep(5);

end;

 

procedure OpenRun;

begin

sleep(5);

KeyDown(92);

sleep(5);

KeyDown(82);

sleep(5);

KeyUp(92);

sleep(5);

KeyUp(82);

sleep(5);

end;

 

 

//OS in scar: control+space, type 'os'

 

procedure OpenToolkitFolder;

begin

OpenMyComputer;

sleep(50);

SendKeysWait('Toolkit',100,100);

PressEnter;

end;

 

procedure AltF4;

begin

sleep(1);

KeyDown(18);

sleep(1);

KeyDown(115);

KeyUp(18);

KeyUp(115);

end;

 

procedure MinimizeAllWindows; //Win + M (92, 77)

begin

KeyDown(92);

sleep(1);

KeyDown(77);

KeyUp(92);

KeyUp(77);

end;

 

procedure PauseUntilBitmap(bitmap:integer);

begin

//trap in loop until specified bitmap is seen and sleep just for safety

end;

 

//http://wiki.scar-divi.com/index.php?title=OpenFile

 

 

var

cleanup_button, cleanup_finished,

win7_start_aero, win7_start_classic, win7_start_safe,

toolkit_icon: Integer;

 

 

 

 

 

begin //BEGIN BITMAP DATA

 

cleanup_button := BitmapFromString(42, 11, 'ceNrFlMEOwCAIQ/f//9v' +

'7Eg+EFFrj5mZPhkgfCgrgSsJQLB6Ico1VJubNp+hnz04p1JEaibt' +

'SXatWFFF0gqo9tRJFN7nKuS04Iq3nLrrp6Rf07LDKWqWbeZhOnZm' +

'Naojdv8rLl/izWvoN9Tnb1g=='); //the button to click

 

cleanup_finished := BitmapFromString(91, 10, 'ceNrNlFEOgDAIQ73/f' +

'fk30WQxQAtW5+TDmC2M7rFiZtsl7IjxI4TLJUelW+ciyiIpssKO/' +

'lVAtLpTgax9If8H4qwUV8aLQnaLRxFjjl33jSlcA1eO6hJ3xC3Uz' +

'VQYAlIas+TsEjsayrtEaARI2lbEcwYQlIIuiJS/BYT4ay0Q+eS7Q' +

'NKXKa90eioAEbj1gfBxV44m1LLOTHtoGY5aHqqfxcfl5NgBP1Od4' +

'w=='); //use to determine if it is done

 

win7_start_aero := BitmapFromString(18, 16, 'ceNoBYAOf/' +

'MNMKs5UI9dnKdx3K+CELOKNLeSTLeSULOiPMVZrd4iqcJ3CT5C5R' +

'4GrS3CYVWCKV1aGUEaDQ8xTJdZkKN15K+GJLeWXLuihLumnLuqrL' +

'NCPQ0ZpeqfIdKrKYqLEVpa+SoSyRm+lRlyaRUyRQ9FcJtxzKuCHL' +

'OWYLumnLuyyLe24Le+9K5Z8WlJ1eLrUgLXPc6zKZaHEVpO8SX+uR' +

'2qhR1aVQ9ZlKN+BLOaWLuqpLu66Lu/DLe/GK/PDLVhpbnWWfMbaj' +

'L3TgLXOcqnIYZ3BUIq1R3SmR12aQ91kIrloNp5pRp5qRL93MOykI' +

'PPTJuW1NiRaeKTDi8zdlsPXibrSfK/LaqPFWJO7SXyrR2WeRSNPc' +

'B1WfSJdhSJfhBVUeyNTdYxnQ514SCRfdsvgnc/fmsjaj7/Ug7TOc' +

'qjHXpi/TIKwR2qiRiCPyk6r4G+55ovL8ZfT8nawzyxojg5biEiBe' +

'NXko9jlosrclMHWh7bPdanJYZvAToe0RnOoSi+d0lyp2Hq34JjI6' +

'LHW7r/f8sDn+xpqlBVihjx8bp7Ag8fbk8fairzTeazLY5a/UG2lS' +

'UF9UCqb0Ven13a035LE5qzU7b7e8o7B4iRqhb69kzRzixZigyhtd' +

'0J/b0iDajl3ZiVkaiFabRZWcyCYz0yk1Wyw3Ia+45/N6rTa81WSs' +

'0t5dP3qq//pqr28knSQhEt5fkh1eGR9a5GKVtebMXuJaxWTzDmf0' +

'12p2Xa134zC5ZzN8jB1lJadZvjnsPbiovfflfvcgv/YbP/VUf/QM' +

'/7CJuyoGjx0hRGNyCCYz0ai1WKr2Xe233Sx4yFujt/Ga/fhmvfdj' +

'PjagPnXcfvVXPzSP/zJLPq3Jb+ZNxZmkROGwxORyyWa0Eai1F2r2' +

'0qQvzF3hv/acvnZfPnYdfrWafvUWvvSQ/zMLvm+KfSqHoeMYwlnn' +

'RB9ug6FwRGQyyCZ0TWg2S98oHGPaf7YZPrVX/rUWfvTTfzRPPzLL' +

'vq/KPexJ+2fGVJ+gwtwqQxqnglsoQZvpwiAvBiU1iJ4mb6wSf3UQ' +

'vzSPfvQOPzNMPvHKvm8KPaxJvSlItGWKCZ0mQ52sg6FvwyHwQyEu' +

'gx6rhR7sSmAmP/IK/zGKfvFKvrCKfm9KPe1J/SsJfKjIvGYG6SOS' +

'BFypxB6tt524fE='); //plain 7 start button

 

 

win7_start_classic := BitmapFromString(41, 12, 'ceNo7r8N+x' +

'4XzUSLP0xK+dzVcO9sSOlZEN23Smb4xfcaa8qZZ6WF19jWdWVcun' +

'KA6uuXE9SSb93kf/8tFAu8WC+5Z3Tf3YOSEvfplqySjJ4nalolbF' +

'CpNmNhKC6tfRrC+aWJ/t4jt/WH2p7stDh5YuuFK7OKT3r27dQuWS' +

'gR0inuXGu7ZsRGqfkogAxIwKF1z5UJ/KIgZOJ0ES6FaNvSU71w+/' +

'dSWuQ82xj3eX37kwsIDd3PXX4ieedC2Zr1s3AzJlCr/S+eOIewN6' +

'cdqDhlWJ8890Lbr2vrLTy9eu33t4smNx5v33snfejV2/nHHxq2yC' +

'XOku/rrIFq2lerCfIowZ3oIcjAETt9caIAeLCeuQAT1CreBHB8YC' +

'tMSM+dQx/ZL6y8+OvDw463rx29c3HLq/PpNR/pnbynrX5w9dVrJo' +

'f07cIc2Hl+vKdcDiuuWb4ZbrWsAVQnVEjh5d8Xa07OP3Np/7fGLO' +

'+t/v5jw8e6MJxen3TlS/WSbz5mFEdDQRgkrGAAFPrrVkMCBASSrE' +

'WqgWhzatsTPOVi5/vyBs+fe3+r5+qj8272EXzdt/l+W+L+Xc8OsI' +

'uzxBQ9DVKuRIwUcF8i+BipGsVqvZK1tx87QGccOH97y80bAz9uev' +

'25Y/r6k8Hsv/49lwuuWz8JuNSLJoVgNiXqw1ZgBjm71rHnzK3rnx' +

'XRuPLWn8/9Vqd8X5H6fFPu5g//vQtZbU7QP7duOI0Uh0htSCMPjE' +

'WSpAU6roVog7DMnDx5eU/FjI+f/zRz/V7L/n8PyfyLT2vaQlcsWn' +

'D99mBblCTK6fP74jvULN03P2dwTuLorduHkOmBJArQXKE4jGwGez' +

'195'); //7 classic (and safe mode)

 

win7_start_safe := BitmapFromString(34, 11, 'ceNq748L5K' +

'JHnaQnfuxquo5MLJmxMa9miv3h/xYp9vRNWVcW2enTPqv9KMXiSz' +

'fu8j//lIoF3iwXP7F2y4GjchL36ZaskoyeJ2paJWxQqLV25iHJb3' +

'jSxv1vE9v4w+8v9tpcu79lwJXbxSe/e3boFSyUCOsV9K0xu3rwJU' +

'XlmKgMcTD0DFHi0ORfKIgQendy59taxzS93Z7093Xr+7oYDd3PXX' +

'4ieedC2Zr1s3AzJ3JaYz58/w+2AGvlo8+YzaEL4wZnOvbe23nr74' +

'Pn7jx/e7bzQt/dO/tarsfOPOzZulU2YIz1n8XSoa0DuRjYSIgDzG' +

'SoP1ee5ubkMHdsvrb/46MDDj+/ePX717Oyth0d3n5u9eG/jzHWVi' +

'5e1P3jwAMNUuFXY/AIXAzNyNz+CiFasPT37yK2jd998ebn/94sJP' +

'58t/nBv2YuL3a/3hV1Zlfzp0yfk4EW1Cc0WJNcDDUeRPBM/52Dl+' +

'vNnb9///nj610fl3+4l/Lpp8/+yxP+9nHtXtmCLSXjYIQyCiMENx' +

'7TFtmNn6Ixjl6+e+n0r6Odtz183LH9fUvi9l//HMuEjB3YgmT0V5' +

'nt4UKCxQEaiWQe3pW3uxuQJu26cmfv/qtTvC3K/T4r93MH/dyHrn' +

'el69+/fxxrZcM0wQUTsg2Iaiy0g8PrNm0t7e39s5Py/meP/Svb/c' +

'1j+T2TaPjnp8OEj79+//0oNAAAt9wqB');

 

 

toolkit_icon := BitmapFromString(19, 20, 'ceNp10GtMWmcY' +

'B/Cv9codDogCVjRARbOCod2MK11japUiShUjishFvNt5qVSTOWuJ' +

'M3FZbV22Vds6kyZdln5yS5N10zRZ+snLrHBEULQyqW5NyrmCtdnb' +

'4FyzbMkv74fnf/7vec7Jbr9+XFOTVlDCzXmfI1WwM+SsjOyUkx+K' +

'y62zf0SGA9hkkDg9MqVwTT4Khkc38esbWEyaWsuRKZkiKZ2XTuMI' +

'qOxUGieNKz8tvmSf3iEG19GZvYi8a0Rc6ZBYema2X41t4WAIgOcp' +

'TB6FwT1Cg4SpBcWy9qGhDWxgHS29dV9YZGCK5WyZMl1jzP54ePw5' +

'/okfTaZzk2nQITooptDTMkUaY9+Pv171Ia4NVGLv5Z06RwXLQEJ2' +

'tkpQVOmamx/dwuKSmXGJNHAmQgKKIItxIg8qKJZ0Dk+/IHp8yLch' +

'gn++gpIuPZZAPRZPiaewklKO84sMZz6bTOKlJ7L4yalilqKA91Gp' +

'yNCY1TJQNP7AFcCcfvSblU3eWS24MFYEZzyVzZCrhHor/4KBp74o' +

'KLfcmPdO7OD9fvSKD+n0httXw04fYns4C65ivZefwODFJdJjXfAi' +

'Zs6pE/1j0q6R295g9xrSAoff1QqH+/yo4+EvAl0d2DaBDr0txlPA' +

'd4EdrviRwQDaCL9q8Py3ltXw5C6RUqiniuVxSYzDhWmQzR1+l8MT' +

'boaRJhhp8PwzbPMimfZejupsAp379k+CYjKz2Yua3QhQ70Fa17Cv' +

'QtjAzOzY0+UvdqONf0fA2F5UbOtl56kZMiVdcpIuVTR5cdMKCthh' +

'zLUTTSszMzW1jGKj3NTWt0VaPFgs7Q0QOddui+s6ReVWoa5eWGo2' +

'efDqFQzoCESaJ76Dai7//PL13Mt9dkXj1+t7Dh8RS41uzOYlmvzk' +

'EaMbr3qGAe2BSIVrPKv12k9/vgZdTlXbl3DQ4SNjKeja18jOrUj3' +

'84gzGO3/PWqEiUvLOGBaJVy7EZbWDFVfhqrauFpzbyha7TlMLT4y' +

'b/R+prlbpLMKSmqFWrPVR+p/w4HKZ4R9nex68CjP4cxv//TG8qbZ' +

'S4JKLO3Yjsg6hvlqHVdVCCnUKfklNTBRtoTHlC/hVW7C5CVqvYRh' +

'BT+a65fx83d/SNfU8T+4ECKjouKajPIG7TyqXcBKF/+XbhGr9xES' +

'y1XBuQphocGHR6aewrnOm42ryJm7j+u3CM0iVrLwbxeXsOYQmeu8' +

'lVvXk1HWILX1K4fuPSEO4MjBi/03ysE7yqEpyzapd+MlC+gRzSJq' +

'ChCKgQmZpW97/83EE3eea1r1+fdzxMFj/OAvVNJEMg==');

 

 

 

//END BITMAP DATA

 

//--------BEGIN-----------------------------------------------------------------

BotInit;

 

 

 

MinimizeAllWindows;

Sleep(500);

OpenMyComputer;

Sleep(500);

 

SendKeysWait('Toolkit',100,100); //Opens flash drive with the folder on it

PressEnter;

 

 

 

end.

//--------END-------------------------------------------------------------------

 

 

[/sCAR]

 

Feel free to take, modify, and distribute. Hopefully what I have so far can help both me and others make a better Windows-oriented script.

Edited by Doctor
Link to comment
Share on other sites

Just note that if anyone has a customized Windows Operating System, you are going to be out of luck lol.

 

Oh trust me, I found that out right away. I have a custom theme and Start button on my dev machine. All taken care of. I decided to rely on coordinates as much as possible rather than bitmaps.

 

 

Another question: For reference and confirmation.. FindBitmapTolerance has a special tolerance you can specify, but nothing really says what differs between tolerance amounts. Is the tolerance simply the amount of color a pixel can stray away from its normal value to be considered okay? And what kind of real image examples can we see being confirmed by extremely high tolerances? I would set it to 99, but I dont want it to click an image completely unrelated.

Link to comment
Share on other sites

Coordinates might not work as good because it relies on monitor screen size. Hotkeys are your best bet.

 

Tolerance of 1 could be 1 color value before and after the current one. ColorToleranceSpeed is the different color types the tolerance can be set for (some are more accurate) the SCAR wiki has info about this in the Tolerance and other sections. You can also check the tolerance between 2 colors. Bitmap Tolerance means all the colors of the bitmap in this range of tolerance (color values).

Link to comment
Share on other sites

Well usually the title bar on Windows, is always in the same place.

 

Interesting, but if you are going to automate windows focus on one OS at a time. You can actually detect what Windows Operating System is being used with SCAR. Just do:

 

You can do CTRL + Space in SCAR, then type in "os" and it will show the possible values for Operating System. Of the (TOpSys type).

[sCAR]

if Operating System = osWinXP then

// Do stuff

[/sCAR]

 

I tried this, but no luck. It seems to think I am running every single version of windows at once. If it helps, these are printing out values such as 9 and 7. I thought they were supposed to print either 1 or 0?

 

EDIT: I think I got it. There was a space (Operating System) in the example and I had removed it to no avail, but this time it worked.

Edited by Doctor
Link to comment
Share on other sites

Seems to work fine on my end...

[scar]begin

WriteLn(OperatingSystem = osWin7);

WriteLn(OperatingSystem = osWinVista);

WriteLn(OperatingSystem = osWinXP);

end.[/scar]

 

Successfully compiled (23.5643 ms)
1
0
0
Successfully executed (12.9462 ms)

 

I'm running Windows 7 x64

Edited by Freddy
Link to comment
Share on other sites

Seems to work fine on my end...

[scar]begin

WriteLn(OperatingSystem = osWin7);

WriteLn(OperatingSystem = osWinVista);

WriteLn(OperatingSystem = osWinXP);

end.[/scar]

 

Successfully compiled (23.5643 ms)
1
0
0
Successfully executed (12.9462 ms)

 

I'm running Windows 7 x64

 

 

I wasn't properly enumerating, I was just doing

 

[sCAR]WriteLn(osWinXP);[/sCAR]

 

They must hold values for the enumerator alone to interpret, not natively in SCAR. Also Freddy, any word on any "IntelliSense" of sorts for SCAR? I also enjoy the feature of right-clicking on a function and having a link back to the declaration. Also, when I compile the script, it is really just verifying syntax, or is it actually being put into an executable somewhere? I think it would be REALLY cool to have SCAR auto compile an EXE with its native tools.

Link to comment
Share on other sites

I'm not quite familiar with what IntelliSense encompasses exactly, I don't use Visual Studio that often... As for compiling, it compiles the script into a bytecode format, like Java class files, but they're not stored anywhere.

 

IntelliSense is a combination of a couple different things:

 

1. It underlines non-existent variables/functions with a red squiggly line to show that you either spelled it wrong or the variable/function has not been declared yet.

 

2. It can auto-complete variables and functions, like say you have a dozen custom-written procedures that begin with Bitmap or Mouse. You just start typing "Bitm" and a menu will pull down with all of them listed, you just click it and it types the rest for you, adds a semicolon, and places your typecursor right before it in case you wanted to add something like "= 3" or something of the sort. I believe you already have code present in SCAR that could be adapted. When I press Control+Space it pulls down a really handy autocompleting menu, and I think it could be recycled and re-used in an IntelliSense of sorts if you wanted to add the feature.

 

3. It has the ability to remember the line a variable or function was both declared and referenced, and allows you to right-click on it and GoTo and it will shoot to the document and highlight it for you.

Link to comment
Share on other sites

IntelliSense is a combination of a couple different things:

 

1. It underlines non-existent variables/functions with a red squiggly line to show that you either spelled it wrong or the variable/function has not been declared yet.

 

2. It can auto-complete variables and functions, like say you have a dozen custom-written procedures that begin with Bitmap or Mouse. You just start typing "Bitm" and a menu will pull down with all of them listed, you just click it and it types the rest for you, adds a semicolon, and places your typecursor right before it in case you wanted to add something like "= 3" or something of the sort. I believe you already have code present in SCAR that could be adapted. When I press Control+Space it pulls down a really handy autocompleting menu, and I think it could be recycled and re-used in an IntelliSense of sorts if you wanted to add the feature.

 

3. It has the ability to remember the line a variable or function was both declared and referenced, and allows you to right-click on it and GoTo and it will shoot to the document and highlight it for you.

 

SCAR has code completion and parameter completion, that should be more than sufficient. Anything else are secondary priorities.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...