Tom Lenc

1

votes
1

answer
334

views

C# Take window/desktop screenshot using SlimDX

I am new to SlimDX and I've heard that there is a way to capture screenshots using this library. The reason I want to use SlimDX is that I want to capture screenshots much faster than Graphics.CopyFromScreen() so that I can make a livestream app running at higher framerates. I have some code I foun...
Tom Lenc
1

votes
0

answer
68

views

Prevent rendering of the desktop selection rectangle

I'm working on small program that basically animates the wallpaper using OpenGL. The wallpaper is all interactive(I use a global mouse hook for the mouse events), but to make it perfect when I hold down the left mouse button, I'd like the selection rectangle to not appear at all. All I could change...
Tom Lenc
1

votes
1

answer
2.6k

views

ROBLOX Change leaderboard team by code

I need to make a code that would change the team of a player. Let's say I have Red Team and Blue Team. Now I want to get a player to the Blue Team by code. How can I do that?
Tom Lenc
1

votes
1

answer
12.5k

views

ROBLOX Kill command to kill specified player

I want to make a command that would kill a player you specify.. Let's say I type: kill/Paul. Now I want to kill the player with the name Paul. This is my command Script: local player = ... game.Players.PlayerAdded:connect(function(player) --this gets the player that connected player.Chatted:connect(...
Tom Lenc
1

votes
1

answer
101

views

Java - set rotation by setting positions of the points for drawing the faces for a cube

I'm doing this in minecraft using a tesselator.... but that doesn't matter. Bacisally I'm drawing a cube using vertexes.. Every face has 4 position points. First look at the world coordinates. I add positions of to the vertexes/faces in this order: DCBA.. you'll get that later..(hopefully) Based on...
Tom Lenc
1

votes
1

answer
272

views

C# Unity 3D NAudio throws NullReferenceException while checking for default audio endpoint

I've just installed Unity 3D because I wanted to make a simple game. There is one problem with the NAudio library though. This is my code: var enumerator = new MMDeviceEnumerator(); if (enumerator.HasDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia)) //
Tom Lenc
1

votes
2

answer
2.3k

views

ROBLOX Get name of a player that clicked a brick

I have this script in a brick: local giver = 1 function onClicked() game.Players.[I NEED THE PLAYER NAME HERE].leaderstats.Clicks.Value = game.Players.[I NEED THE PLAYER NAME HERE].leaderstats.Clicks.Value + giver end script.Parent.ClickDetector.MouseClick:connect(onClicked) Now I need to somehow ge...
Tom Lenc
1

votes
2

answer
1k

views

Do something after a music ends with SoundPlayer

I need to do something after my Async Loaded music file finishes. Let's say I want the program to exit or something. Now how do I make it do is after the music finishes? Any ideas? Here's the code I have for now: private void button1_Click(object sender, EventArgs e) { player.SoundLocation = @'Music...
Tom Lenc
1

votes
2

answer
569

views

Get file size and save it to a variable in MB[BATCH]

I have a file called Update.zip and It's size is 50.25MB. And I also have this command: for %%A in (Update) do set Size=%%~zA echo %Size% MB pause>nul And I get output like this: 50250. I want the batch file to output the file size in MB so the output should look like this: 50.25 MB Anybody?
Tom Lenc
1

votes
3

answer
2.7k

views

Get full path of a running process and save it to a variable

I want to get the full path of a running process and save it to a variable. Let's say I want to get the full path to a file called notepad.exe. I tried to search for the solution, but I didn't find any. I think that it can be done with the tasklist command or something similar.. I'm not sure. Any id...
Tom Lenc
1

votes
4

answer
797

views

How to change the specific line in an XML file?

I have a really long config file(not my own) and I want to change a specific line in it. I need to change the ServerPort value to 12345 for example, but without the code knowing the actual number..(the 26900). this is a very small part of the config file:
Tom Lenc
2

votes
1

answer
93

views

HttpGet getting text with unwanted characters

I have this in my MainActivity.java file: public static void getLatestVersion() { try { String myUri = 'http://www.stonequest.de/version.php'; HttpClient httpClient = new DefaultHttpClient(); HttpGet get = new HttpGet(myUri); HttpResponse response = httpClient.execute(get); String Latest = EntityUti...
Tom Lenc
1

votes
3

answer
53

views

Why is this code keep being “terminated”?

I have this code in Eclipse: package test; import java.util.Scanner; class test{ public static void main(String args[]){ Scanner Input = new Scanner(System.in); if (Input.equals('payday2')){ System.out.println(Input); } } } Now when I try to start the code/aplication, it terminates itself...
Tom Lenc
2

votes
1

answer
449

views

Not recognized command everytime in the first line of a code

I have a problem with my BATCH file... Whatever is written on the first line, it says: [command] is not a command. Like so: @ECHO OFF I get this output: [C:\folder (path)]>´╗┐@ECHO OFF ´╗┐@ECHO is not a command It does the same even in a clear batch file(nothing except @ECHO OFF in it). Pl...
Tom Lenc
2

votes
2

answer
2.9k

views

Making a folder with incrementing number depending on existing folders with same name

I want to make a batch file which creates a folder with an incremented number when there is one already existing with the same name. For example for a folder called folder something like this: if exist folder md folder1 if exist folder1 md folder2 What I want is to make another folder with an increm...
Tom Lenc
2

votes
1

answer
2.6k

views

UE4 - How can I DOF-Blur the screen on pause?

That's what I'd like to know. I don't understand the unreal engine scripting at all.. I know how to enable the blur manually, but how do I enable it on pause? I have a Widget Blueprint with RESUME and EXIT buttons.. And when I open the menu, the background should be blurry.. now the menu is openable...
Tom Lenc
2

votes
6

answer
1.1k

views

Thousands separator of an integer value

Let's say I have this in my batch file: set var1=12345 And I want to add commas in the first variable (var1) and save it to another variable (var2). That means that the second variable (var2) should have this value: 12,345. So If the first variable (var1) had this value: 123456789, the second one's...
Tom Lenc
2

votes
2

answer
94

views

Jump to other void

I got this code: public void main(){ } public void first(){ System.out.println('first void'); } public void second(){ System.out.println('second void'); } public void third(){ System.out.println('third void'); } Now I want to add a code to the main void that would skip to the third one for example....
Tom Lenc
2

votes
2

answer
339

views

Change final variable defined in another java file

I'm programming a mod. Here's the code: package net.minecraft.client.gui; import java.io.IOException; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.audio.SoundHandler; import net.minecraft.client.renderer.GlStateManager; i...
Tom Lenc
2

votes
1

answer
83

views

Get all text from online text file and show it all in a TextView

I want to get all the text from a webpage and save it to a String array/list and then print it in a View/Activity.. Let's say I have URL www.my.url/html.php and on that page is this: Paul Caroline Steve' ... ... And now I want them to be written in the same position in an View/Activity. I have this...
Tom Lenc
1

votes
3

answer
2.7k

views

JButton set the button text to a variable

I will make a java game similar to cookie clickers, but is seems that I can't put a variable as a text in the button. This is what is causing the problems, because the variable isn't a string(I cut out the other part of the code, because it's not important for now): import javax.swing.JFrame; import...
Tom Lenc
2

votes
1

answer
879

views

Visual Studio KB2829760 fatal error while uninstalling

I need to reinstall vsial studio community, but when it was uninstalling, this is what it was saying: KB2829760 : Fatal error during installation. Any ideas what the hell is that and how can I fix it?
Tom Lenc
4

votes
6

answer
5k

views

Visual Studio Community 2015 Services not available

The problem is that I can't sign in to my visual studio, so can't use it. My 30 day license expired and that means that I have to sign in in order to use it. So I hit Sign in button. A white window saying 'We're getting things ready' shows up and after a while labled: 'Sorry, we ran into a problem',...
Tom Lenc